Reading Hex strings

37 views
Skip to first unread message

Paul Slocum (SOFTOFT TECHECH)

unread,
Apr 1, 2013, 9:45:48 PM4/1/13
to pdfhummus-in...@googlegroups.com
Does PDF Hummus support reading of hex strings?  I'm reading a hex string using the parser, but it appears to just be reading it in as a regular string rather than reading it as a hex value.

The PDF that I'm reading contains the following line:

/V <FEFF>

I'm using the Hummus parser to grab the value like this:

textFieldValue->GetValue().c_str();

I expect this to return a string that contains {0xFE, 0xFF, 0}, but instead I get the string {'F','E','F','F',0}.


thanks,

-paul



Paul Slocum (SOFTOFT TECHECH)

unread,
Apr 2, 2013, 11:28:30 AM4/2/13
to pdfhummus-in...@googlegroups.com
It looks like this was already fixed a while ago and I just need to upgrade my PDF Hummus library.

Paul Slocum (SOFTOFT TECHECH)

unread,
Apr 2, 2013, 11:39:18 AM4/2/13
to pdfhummus-in...@googlegroups.com
Hmm, I updated to a more recent version, but I'm still having the problem with hex strings.

-paul

Gal Kahana

unread,
Apr 2, 2013, 2:06:26 PM4/2/13
to pdfhummus-in...@googlegroups.com
Hi Paul,
yeah...the parser reads hex strings, but like a regular string. it doesn't provide it as  a sequence of bytes. i could easily write something to add for that, either as a wrapper or in the object itself.
something like GetAsBinary that will return an array of unsigned chars with the hex values. will that be good?

Gal.

Paul Slocum

unread,
Apr 3, 2013, 11:54:02 AM4/3/13
to pdfhummus-in...@googlegroups.com
Okay, I understand now.  I just to need check whether it's a regular string or hex string and convert it if it's a hex string.  That's easy to do.

It might be handy to have a GetAsBinary feature in the library.

-paul


--
You received this message because you are subscribed to the Google Groups "PDFHummus interest group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pdfhummus-interest...@googlegroups.com.
To post to this group, send email to pdfhummus-in...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/pdfhummus-interest-group/-/3gy2ouaaSs8J.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages