Hi all,

I'm working on a report generator that uses iText to generate PDF files. The 
content of the individual pages is composed by first printing a template, which 
is read from another PDF using PdfWriter.getImportedPage() followed by 
PdfContentByte.addTemplate(); then, the actual data are printed on top of the 
template using the usual PdfContentByte methods. Repeat for each page.

All this works fine, except for one thing: the final reports consist of about 
80% font data. Simply opening and then saving them in Acrobat will shrink them 
considerably, sometimes by more than 50%. Apparently, there are a lot of 
duplicated fonts in the generated PDFs, but I don't understand how they get 
there.


The templates I use for the individual pages do not contain any embedded fonts; 
when I use a font in the code that populates the data, I'll create it with the 
BaseFont.EMBEDDED flag, but from the Javadocs, it is my understanding that 
those fonts should only get embedded once. Could it be the process of reading 
the templates that is causing the same set of fonts to be embedded over and 
over?

Thanks for any insights!

 - Thomas

 
---------------------------------
Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to