Am 17.01.2017 um 17:23 schrieb Christopher Begley:
Is it possible to use PDFBox to parse a dictionary given as a string? (Possibly 
generated/originating from another source)

Why would you want to do that?

You could have a look at BaseParser.java and search for parseCOSDictionary(). However this assumes you're in a PDF file, you would have to initialize lots of things.


  For example, if I have:

<</Type/Page/Parent 2 0 R/Resources<</Font<</F1 6 0 R/F2 9 0 R/F3 11 0 R>>/ExtGState<</GS8 8 0 
R>>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/MediaBox[ 0 0 612 1008] /Contents 5 0 
R/Group<</Type/Group/S/Transparency/CS/DeviceRGB>>/Tabs/S/StructParents 0>>

This structure is not complete, i.e. things like "6 0 R" are references to other objects.

Tilman


Is there a way to take this string and load it into a COSDictionary object and 
then parse key/value pairs?

I've looked at the COSDictionary documentation and there doesn't seem to be any 
(obvious) way to do this.

If PDFBox is not able to do this, does anyone know of any open source parsers 
out there that would accomplish this?  Thanks in advance.



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to