Hi guys,
I have a Pdf file made of one single image, and it's readable with Acrobat
Reader 10.1.6.
If I create a new pdf using the PdfConcatenate class to concatenate
it with other pdfs or just passing only that file the resulting pdf is
blank and throw the exception "Insufficient data for an Image".
I used iTextSharp 5.3.5 and 5.4.1, and the code is something like:
FileStream fsPdfFinale = new FileStream(finalPdf, FileMode.Create);
PdfConcatenate pdfConcat = new PdfConcatenate(fsPdfFinale);
foreach (String PercPdf in pdfs)
{
FileStream fsPdfLettura = new FileStream(PercPdf,
FileMode.Open);
PdfReader pdfReader = new PdfReader(fsPdfLettura);
List<Int32> NumPaginaPdf = new List<Int32>();
nTotalPages += pdfReader.NumberOfPages;
for (Int32 contPag = 1; contPag <=
pdfReader.NumberOfPages; contPag++)
{
NumPaginaPdf.Add(contPag);
}
pdfReader.SelectPages(NumPaginaPdf);
pdfConcat.AddPages(pdfReader);
pdfReader.Close();
fsPdfLettura.Close();
fsPdfLettura.Dispose();
}
pdfConcat.Close();
fsPdfFinale.Close();
fsPdfFinale.Dispose();
Thx,
Zwonimir
_9902251152_77.pdf (36K)
<http://itext-general.2136553.n4.nabble.com/attachment/4658229/0/_9902251152_77.pdf>
--
View this message in context:
http://itext-general.2136553.n4.nabble.com/Insufficient-data-for-an-Image-when-using-PdfConcatenate-tp4658229.html
Sent from the iText - General mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and
their applications. This 200-page book is written by three acclaimed
leaders in the field. The early access version is available now.
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php