Reading PDF Bookmarks from PHP

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Deane Barker

    #1

    Reading PDF Bookmarks from PHP

    I'd like to open an existing PDF and read out the bookmarks present in
    the document.

    Using PDFLib (http://www.pdflib.com/), I managed to get the page count
    out thusly:

    $pdf = pdf_new();
    pdf_open_file($ pdf);
    $pdi = pdf_open_pdi($p df,'x.pdf',NULL ,0);
    $numPages=pdf_g et_pdi_value($p df,"/Root/Pages/Count",$pdi,0,0 );

    However, I can't even see an interface for getting the bookmarks out.
    I'm not married to PDFLib -- anything will do.

    Deane
Working...