Sunday, 15 July 2012

PoDoFoColor Lua Scripting

sdaau wrote in with some news about podofocolor, I'd like to share:

I just found about podofocolor on - and I got really interested in "Analyzing colors - Find out, which colorspaces or colors are used in a PDF". I couldn't find an example of how to do that on that page, and I assumed the only way to do is through Lua.

Unfortunately, while there are some PPA builds for Ubuntu ( see ), those do not have Lua built-in, so I rebuilt podofo and utils on Lucid, and posted the executables here - since they are statically linked, they may be useful to others as well:

I have also recorded the steps to building those executables in

The above directory also contains a modification of the example.lua script:

... which can be used to simply print out any color encountered in a PDF, by using this command line:

$ ./libpodofo-utils-lucid/podofocolor lua example-colorlist.lua /path/to/mytest.pdf /dev/null

<]/Info 2 0 R/Root 1 0 R/Size 16>>
Processing page 1...
-> Lua is parsing page: 1
Reading object 6 0 R with type: Number
set_non_stroking_color_gray: 1
set_non_stroking_color_cmyk: 0.233887 1 1 0.218994

Note that it is important to add `/dev/null` as output file - otherwise, both the color report _and the pdf in its entirety_ will be dumped to the terminal - making the report about colors impossible to read.

I would have appreciated a lot a similar guide/explanation on the blogspot webpage (or in a help/readme); and I'd be very happy if some of this here can contribute towards more detailed examples in then documentation.

Many thanks for the great software,

The original post can be found here:
If you also have interesting PoDoFo stuff to share, feel free to drop me a mail.

KBarcode KDE4 Port Status Update

Fanda provided some updates on the status of the KBarcode-KDE4 port:

The version tagged as "port-1.0" on works and has the most of the Kbarcode's functionality except a database support. It compiles succesfully with few compile warnings and uses all of the Kbarcode's source files except gnubarkodeengine.cpp and gnubarkodeengine.h . But it still uses QT3 support classes like Q3Canvas, Q3SqlCursor, Q3DataTable, Q3SimpleRichText, etc. I am currently working on porting the QT3 support classes to pure QT4. I have already ported Q3Canvas and related stuff to QGraphicsScene (which proved to be the most difficult porting) but I haven't pushed it to the online repository on yet.
I am so glad to this project to be continued! It looks much prettier than the KDE3 version and even did import my old KBarcode3 label files without any problems.

Want some screenshots? Here you got.