views:

194

answers:

3

I'm investigating the possiblity of creating PDF files from an embedded system, specifially an ARM9 using the IAR tools. Open-souce or licensing is fine - I'm finding it difficult to search for online, and I'm hoping someone here has used a package. C or C++ is preferred, we will be creating fairly simple reports with only a little text and graphics.

UPDATE: By searching SO, I did find PDFTron - anyone have any experience with it? Seems like it might do what we want.

A: 

!!!

(is this a webserver? Otherwise it seems like it would make more sense to spit out text files as reports and convert on a PC.)

No experience, but maybe libHaru ? Wikipedia has a list of PDF software.

Jason S
Thanks - looks good. The device is a biotech instrument, PDF is for outputting the reports
Jeff
Ah. I was going to guess medical next. (our company makes medical products and we have faced a vaguely similar issue but we just log to a file on an SD card.)
Jason S
A: 

Look at iText - I've used that before and it works well.

(It is Java-based, but you said "C or C++ is preferred", not required)

David
I would have mentioned that too, but Java doesn't seem to mix well with embedded systems; maybe this one has enough memory/cpu etc. to handle it.
Jason S
You might consider building it with the GCJ compiler [http://gcc.gnu.org/java/], which was built with embedded systems in mind.
Charles Duffy
A: 

How large is the system you're targeting? If you can afford to run a Python interpreter and a copy of Inkscape (no X needed), there's a great toolchain available.

Last time I faced the kind of problem space you're in, I used Inkscape to render SVG to PDF in non-GUI mode, as follows:

inkscape --without-gui --export-pdf=foo.pdf foo.svg

...where the SVG is built using template substitution. (In doing this in the past, I used the Genshi template language for building the templates, which happens to interoperate wonderfully with Inkscape's GUI functionality -- Inkscape-the-GUI-SVG-editor doesn't remove tags in namespaces it doesn't recognize, so you can edit a SVG template in Inkscape even after marking it up to work as a Genshi template!)

My use case was automatic generation of cover pages for outgoing fax jobs; a complete set of scripts implementing this method for HylaFAX+ is available in the mailing list archive here.

Charles Duffy
It's a very small system, so I think Python won't work, but I will keep it in mind - thanks!
Jeff
*nod*. Inkscape itself isn't Python-based -- the Python is just needed for the Genshi interpreter -- but Inkscape itself is at least as CPU-intensive (and its dependency chain at least as large) as Python's is, so if you can't run Python this approach probably isn't the right tool for the job.
Charles Duffy