---------- 转发的消息 ----------
发件人: <alex.c...@cognizant.com>
日期:2011-5-20 下午3:38
主题:Help Needed-Can't get the PDF page content and resources ues the
itextsharp 4.0.3 when the PDF type is distiller
收件人: <alexni...@gmail.com>
itext-questions@lists.sourceforge.net
Hi,
I can't get the PDF page content and resources ues the itextsharp 4.0.3 when
the PDF type is distiller.
The pdf name is:1571es.pdf
Download address is:
http://www.fda.gov/downloads/AboutFDA/ReportsManualsForms/Forms/UCM083533.pdf
I have tracked the itextsharp source code found the contents Is Stream, the
code as below:"
if (contents.IsStream()) {
return GetStreamBytes((PRStream)contents, file);", I call this method only
return 78 bytes contents, not all of the page content and resources; but
another PDF the type is still distiller, the pdf name is:356HesCA2LOD8P.pdf,
download address is :
http://www.fda.gov/downloads/AboutFDA/ReportsManualsForms/Forms/UCM082348.pdf,
i found this PDF contents Is Array, the code as below:"
else if (contents.IsArray()) {
PdfArray array = (PdfArray)contents;
bout = new MemoryStream();
for (int k = 0; k < array.Size; ++k) {
PdfObject item = GetPdfObjectRelease(array[k]);
if (item == null || !item.IsStream())
continue;
byte[] b = GetStreamBytes((PRStream)item, file);
bout.Write(b, 0, b.Length);
if (k != array.Size - 1)
bout.WriteByte((byte)'\n');
}
return bout.ToArray();
}", I call this method can get all of the page content and resources.
So could you help me how to get the 1571es.pdf page content and resources,
i'm looking forward to your reply, thanks!
Thanks and Regards
Alex Chen
Cognizant China Development Center
------------------------------
Work: +86 21 61006466, Ext 69349 | VNet: 8-69349 | Mobile: 86-13918675207 |
Location: Shanghai China | Email:
alex.c...@cognizant.com<cathryn.c...@cognizant.com>
This e-mail and any files transmitted with it are for the sole use of the
intended recipient(s) and may contain confidential and privileged
information.
If you are not the intended recipient, please contact the sender by reply
e-mail and destroy all copies of the original message.
Any unauthorised review, use, disclosure, dissemination, forwarding,
printing or copying of this email or any action taken in reliance on this
e-mail is strictly
prohibited and may be unlawful.
------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its
next-generation tools to help Windows* and Linux* C/C++ and Fortran
developers boost performance applications - including clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
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