It may happen with broken PDFs. Call PdfReader.shuffleSubsetNames() and see if something happens. If you still have problems send me privately a couple of those PDFs and runnable code to test it.
Best Regards,
Paulo Soares
-----Original Message-----
From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED] On Behalf Of Gary Wu
Sent: Thursday, January 22, 2004 22:44
To: [EMAIL PROTECTED]
Subject: [iText-questions] fonts get changed when concatenating PDF files
Hi,
I use the following code to concatenate PDF files into a result PDF. The
problem I have is, in the result PDF, some texts are in different fonts than
the original PDF files. Any idea what causes the problem? I saw a similar
post about fonts and file concatenation. Does iText support concatenating
files while keeping all the fonts the files use embedded in the result PDF?
PdfReader _pdfReader;
com.lowagie.text.Document _resultPdf;
PdfWriter _pdfWriter;
PdfContentByte cb;
PdfImportedPage page;
int totalNumOfPages = _pdfReader.getNumberOfPages();
Rectangle rectangle;
for (int i = 1; i <= totalNumOfPages; i++)
{
rectangle = _pdfReader.getPageSizeWithRotation(i);
_resultPdf.setPageSize(rectangle);
_resultPdf.newPage();
page = _pdfWriter.getImportedPage(_pdfReader, i);
cb.addTemplate(page, 1f, 0, 0, 1f, 0, 0);
}
Thanks,
Gary
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions
