Skip to main content
Participant
January 11, 2021
Question

Reading contents of a PDF file from its HEX code

  • January 11, 2021
  • 1 reply
  • 3541 views

Hello,

 

I have a requirement to process pdf forms within SAP that were generated outside of SAP.

I am trying to see if there is a way to interpret the form fields by converting the HEX / .BIN format of the PDF into something that is readable text. 

 

For Example: I am trying to interpret something like this

%PDF-1.7
%µµµµ
1 0 obj................................

stream
xœì]xTUÚ>çÞiÉd’™ôdf@˜„„„Šd BÉ`&HHCQŒŠ Q,kïèÚv±L”€

 

To the actual contents which is "TEST 1234"

 

Any help or direction is highly appreciated. 

 

PS: I have already exhausted the SAP forums for answers 🙂 

 

Thanks

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
January 11, 2021

Sure, you just need to write your own PDF parser. The document describing how to do it is about 1000 pages of an extremely technical nature. Try searching for "ISO 32000". Good luck!

 

PS. That's assuming it's a PDF 1.7 or lower. If it's a PDF 2.0 file then you need to add several hundred pages to it.