Forum How do I...?

Use Javascript to get PDF page labels

We are using Javascript to obtain the page number information from our Prince-generated PDFs and insert them into a database application, but these values do not correspond to the page labels in the PDF so frontmatter begins on page 1, when the reality is that the book content begins on page 1. We currently have a formula to help fix this issue, but are wondering if there is a way to simply obtain the page labels from the PDF via Javascript and report this directly in a log file.
I think we would need to add the page labels to the box tree as currently page styling is not accessible to JavaScript. Another possibility might be to use a PDF tool to dump the page labels.