You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Sean Bridges (JIRA)" <ji...@apache.org> on 2009/05/14 00:48:45 UTC
[jira] Commented: (PDFBOX-471) invalid dictionary crashes parser
[ https://issues.apache.org/jira/browse/PDFBOX-471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12709195#action_12709195 ]
Sean Bridges commented on PDFBOX-471:
-------------------------------------
Another related change is to allow null values in a dictionary without throwing.
--- src/main/java/org/apache/pdfbox/pdfparser/BaseParser.java
+++ src/main/java/org/apache/pdfbox/pdfparser/BaseParser.java
@@ -214,9 +214,11 @@
if( value == null )
{
- throw new IOException("Bad Dictionary Declaration " + pdfSource );
+ logger().warning("Bad Dictionary Declaration " + pdfSource );
+ } else
+ {
+ obj.setItem( key, value );
}
- obj.setItem( key, value );
}
}
char ch = (char)pdfSource.read();
> invalid dictionary crashes parser
> ---------------------------------
>
> Key: PDFBOX-471
> URL: https://issues.apache.org/jira/browse/PDFBOX-471
> Project: PDFBox
> Issue Type: Bug
> Affects Versions: 0.8.0-incubator
> Reporter: Sean Bridges
> Fix For: 0.8.0-incubator
>
> Attachments: patch
>
>
> this is with svn version 774426
> I am trying to parse an invalid xml document, with a dictionary of the form
> /Producer (Virtual Print Engine PDF v1.0)
> /CreationDate (D:20081120145900)
> /Author (PowerGUI)
> /Title (Document Title)
> /Subject
> /Creator (Some Creator)
> Clearly, the /Subject dictionary value is invalid, but it would be nice if PDFBox didn't throw.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.