RandomMonkey has asked for the wisdom of the Perl Monks concerning the following question:
Does anybody have (or could write) a simple PDF::API2 main example that will traverse all the objects of an opened pdf file? I have spent some time now reading through the docs and googling for examples and I so far have either found no existing results (or have not discovered a proper google/PerlMonks search string).
More specifically, what I would like to do is open a pdf file and be able to traverse the (at least text) objects of the file and extract the info from each internal object (and now that I have identified these internal objects, be able to perhaps identify other meta information from the specific object). PDF::API2 appears to have this capability, but I have so far not been able to figure out how to do it.
I have already scoured Google and PerlMonks for information. I have found many really good threads discussing creating pdf documents. And even some threads that appear to answer my question, but all of the cited examples are no longer reachable.
I am still a bit hazy about how to even identify the display objects in the $pdf object. Ideally, I would like an example that opens a pdf with PDF::API2, shows how to identify/navigate through the object list/tree(?) and show how to extract text (and/or other information) from these internal objects.
Thanks in advance for any clues or help. :-D
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: PDF::API2 traversing object tree and parsing text
by chrestomanci (Priest) on Sep 02, 2011 at 09:09 UTC | |
by Anonymous Monk on Sep 02, 2011 at 09:38 UTC | |
by chrestomanci (Priest) on Sep 02, 2011 at 12:01 UTC | |
by Anonymous Monk on Sep 02, 2011 at 13:27 UTC | |
by Lotus1 (Vicar) on Sep 02, 2011 at 13:14 UTC | |
by Anonymous Monk on Oct 12, 2011 at 19:23 UTC |