Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException in SimpleBookmark.getBookmark() #580

Closed
andreasrosdal opened this issue Jul 21, 2021 · 0 comments · Fixed by #582
Closed

NullPointerException in SimpleBookmark.getBookmark() #580

andreasrosdal opened this issue Jul 21, 2021 · 0 comments · Fixed by #582
Labels

Comments

@andreasrosdal
Copy link
Contributor

andreasrosdal commented Jul 21, 2021

Describe the bug
We get an NullPointerException in SimpleBookmark.java SimpleBookmark.getBookmark().
OpenPDF version 1.0.5. Running on Linux with Java 11.

This is the Exception stacktrace:
Caused by: java.lang.NullPointerException
at com.lowagie.text.pdf.SimpleBookmark.bookmarkDepth(SimpleBookmark.java:123)
at com.lowagie.text.pdf.SimpleBookmark.getBookmark(SimpleBookmark.java:289)
at no.foobar.pdf.PdfDocument.write(PdfDocument.java:605)

This is the relevant code line where the NullPointerException occurs:
https://github.com/LibrePDF/OpenPDF/blob/1.0.5/openpdf/src/main/java/com/lowagie/text/pdf/SimpleBookmark.java#L123

To Reproduce
Code to reproduce the issue
List bookmarks = SimpleBookmark.getBookmark(reader);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant