I'm setting up an app to print tickets using PDF forms. Sometimes we have a
need to print over 1000 tickets, so I use a stamper to fill a form, then
append the page to another master document. The problem is that each page
has fonts embedded in them and the filesize gets huge. I reaved a 21MB pdf
in Acrobat Professional and it brought it down to 1.5MB, so there is a ton
of wasted space. Is there a better way to handle this so that the fonts
only get embedded once?
foreach (RequestDetail detail in details)
{
// PrintPaperPass uses the stamper to create the completed temp
pdf file and flatten it
detail.PrintPaperPass(Server.MapPath(formFile),
Server.MapPath(tempFile));
PdfReader readerTemp = new PdfReader(Server.MapPath(tempFile));
PdfContentByte cb = writer.DirectContent;
document.NewPage();
PdfImportedPage page = writer.GetImportedPage(readerTemp, 1);
cb.AddTemplate(page, 0, 0);
}
--
View this message in context:
http://www.nabble.com/Duplicate-Font-Problem-%28itextsharp%29-tf3728362.html#a10435266
Sent from the iText - General mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
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/