Discussion:
[iText-questions] BaseFont.getDocumentFonts() ran into infinite loop when circular references present in a PDF file
Baohua Gu
2015-04-29 23:51:54 UTC
Permalink
Dear iText developers,

We ran into this the other day which caused all CPU cores over 80%
occupied and the server become not responding.

It turned out the culprit was the BaseFont.getDocumentFonts() method
never exits on a few PDF files containing circular references. This
seems to be true in iText v5.4.0 and v5.5.5. We wanted to upload the PDF
files that we hit the problems, but we couldn't until we get permissions
from our clients who are the owner of the files.

We knew the files contain circular references by running "pdf2ps"
command and got the following warnings:

====================
**** File has circular references in resource dictionaries.
**** File has circular references in resource dictionaries.
**** File has circular references in resource dictionaries.
**** File has circular references in resource dictionaries.
**** File has circular references in resource dictionaries.
**** File has circular references in resource dictionaries.
**** File has circular references in resource dictionaries.
**** File has circular references in resource dictionaries.
**** File has circular references in resource dictionaries.
**** File has circular references in resource dictionaries.
**** File has circular references in resource dictionaries.
**** File has circular references in resource dictionaries.

**** This file had errors that were repaired or ignored.
**** The file was produced by:
**** >>>> Microsoft� Word 2010 <<<<
**** Please notify the author of the software that produced this
**** file that it does not conform to Adobe's published PDF
**** specification.
====================

Can you please take a look?

Thanks

Mark


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
iText-questions mailing list
iText-***@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://i
Loading...