Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#9 PDDestination create( COSBase base ) ?

v1.0 (example)
closed
nobody
None
5
2005-03-20
2005-02-09
No

Hi there,
I'm trying to write a small utility that extracts the
bookmarks with the page numbers. Extracting the
bookmarks was fine. When extracting the page numbers I
tried:

PDPageDestination dest = (PDPageDestination)
curItem.getDestination(); // curItem is of type
PDOutlineItem

The getDestination method calls
PDDestination.create( node.getDictionaryObject( "Dest" ) );
node.getDictionaryObject( "Dest" ) returns COSString in
my case (which however contains an
ByteArrayOutputStream). The PDDestination.create method
only runs succesful if the type is COSArray. Therefore
the getDestination fails. (I'm using 0.7).
Any hint?
:-) stw

Discussion

  • Ben Litchfield
    Ben Litchfield
    2005-02-09

    Logged In: YES
    user_id=601708

    PDFBox currently supports explicit destinations and your PDF
    has an implicit destination(aka a named destination).

    Can you attach/mail me the PDF.

    Please add an RFE for this or submit an implementation.

    ben@csh.rit.edu

     
  • Logged In: YES
    user_id=675521

    Hi Ben,
    thx for the quick reply. I'm not sure if I understand both
    Java and PDF enough to submit an implementation (what I
    would love to do). I was just using an arbitrary PDF for
    testing. However we want to be able to analyze all sorts of
    PDF. If you can point me to some referenc I might be able to
    contribute. Until then I'llupload the file and put in an RFE.
    ;-) stw

     
  • Logged In: YES
    user_id=675521

    Hi Ben,
    thx for the quick answer. I used an IBM redbook for testing.
    My needs are to read any type of bookmark. My Java and PDF
    skills might not live up to the quality needed for PDFBox,
    so if you could give me a hint how to implement I could try
    to contribute. Until then I've logged an RFE.
    :-) stw

     
  • Logged In: YES
    user_id=675521

    Hi Ben,
    thx for the quick answer. I used an IBM redbook for testing.
    My needs are to read any type of bookmark. My Java and PDF
    skills might not live up to the quality needed for PDFBox,
    so if you could give me a hint how to implement I could try
    to contribute. Until then I've logged an RFE.
    :-) stw

     
  • Ben Litchfield
    Ben Litchfield
    2005-03-20

    Logged In: YES
    user_id=601708

    This was also an RFE which is not implemented.

    Ben

     
  • Ben Litchfield
    Ben Litchfield
    2005-03-20

    • status: open --> closed