You are viewing udrepper

Ulrich Drepper - OO.org PDFs exported [entries|archive|friends|userinfo]
Ulrich Drepper

[ website | My Website ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

OO.org PDFs exported [Dec. 31st, 2006|01:13 pm]
Previous Entry Share Next Entry
I write all my documented using TeX but I like using OO.org (especially calc) for preparing data. My test programs usually emit .csv files which calc can read. Then I can do the preprocessing of the data using the spreadsheet (the greatest type of application ever developed).

When I want to use the data in my TeX documents I used to export the graphs as PDFs. I.e., I copy&pasted them to draw and then wrote the PDF. This works OK, the results always looked good since they were native PDF files. Scaling in the PDF viewer works.

There is a drawback, though, which only became really obvious in my latest project. An upcoming document features a lot of graphs (about 20 so far). I used the OO.org generated PDFs with the result that the generated document PDF was larger than 2MB. Each graph weighs in at about 100kB. That's not acceptable nor necessary.

Looking at the files it's obvious that the overhead is due to embedded fonts. Something which is needed, for most cases. I it is not for me since I use the same typefaces I have in the document as well or at least in the other graphs. Maybe there is a way to tell OO.org to not write out the font information. I haven't found it, though.

Regardless, I'm using something better now anyway. I'm already using MetaPost to generate figures. MetaPost comes with graph.mp, a macro package to generate graphs. The graphs generated by it by default are very plain and IMO not really publication quality. At least not for today's world, things were different when graph.mp was written.

But since this is MetaPost (for those who don't know it, it's basically Knuth's Metafont changed to generate Postscript graphs instead of font files) it's fully programmable. After reading graph.mp I now have templates for MetaPost to generate several of the types of graphs OO.org's calc can produce. All driven by text files containing the measurements.

The result: the graphs IMO look nicer since I have more fine-grained control over the generation and the document PDF file shrank from ~2.2M to 600kB. I just love TeX and friends. No OO.org word processor (or equivalent product) can ever produce documents of this quality.
linkReply