rtfarte / OpenPDF

No longer actively maintained. Please send all pull requests to: https://github.com/librepdf/openpdf
Other
31 stars 12 forks source link

ClassCastException in SimpleBookmark.getBookmark() #4

Open ghost opened 8 years ago

ghost commented 8 years ago

I sometimes get the following exception in the latest version of OpenPDF when getting bookmarks from a PDF:

Caused by: java.lang.ClassCastException: com.lowagie.text.pdf.PdfString cannot be cast to com.lowagie.text.pdf.PdfDictionary at com.lowagie.text.pdf.SimpleBookmark.getBookmark(SimpleBookmark.java:289) .....

The ClassCastException occurs here: https://github.com/rtfarte/OpenPDF/blob/master/openpdf/src/main/java/com/lowagie/text/pdf/SimpleBookmark.java#L289