Hi,
please upload the PDF somewhere. Most attachments are not allowed here.
Tilman

Am 25.11.2018 um 11:14 schrieb Michel Cozzolino:
Hi,
I'm a newbie on PDFBOX. I've to extract bookmarks and relevant destination pages from customer generated pdfs. All the pdf files have the very same structure.
Opening such pdf in a pdf reader I see the bookmarks with pages.


image.png

But looking for page-destination in both PageDestination and ActionGoto modes, results in error. In fact both the following "if" statements result false:
(Kotlin code)
val document: /PDDocument/= load(file)val outline:/PDDocumentOutline!/ = document.documentCatalog.documentOutline var current: PDOutlineItem? = outline.firstChild if (current.destination is PDPageDestination) --> results _false_ if (current.action is PDActionGoTo) --> results _false_ too
current.title --> results the _correct_ value
what am I doing wrong? Is there other way pdf store bookmark page destinations?
Is there a way to analyse the structure of the "current" object?
Thanks for help!

Michele


Reply via email to