Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Reading content of an PDF from archive

martin_svik2
Participant
0 Kudos
657

Hi,

is it possible to read the content of archived documents (SD invoices). I have a PDF where i have the invoice number, (000000421) see below:

I can retrieve the PDF content in binary format and in char-format with function module ARCHIVOBJECT_GET_BYTES. The result is like that and not "readable":

binary content:

char-content:

So how can i bring this data into "readable" content ? Any ideas ?

br Martin

4 REPLIES 4

FredericGirod
Active Contributor
533

it depends of your PDF, some PDF contains a picture, so you need an OCR

if you generate the PDF from SAP, you could create flag inside the pdf, and read the content of these flags (it is Interactive Adobe Form)

martin_svik2
Participant
0 Kudos
533

frdric.girod Sorry, i cant change the PDF, the pdf's are already archived as i described. So i have to read the content from the archived document.

FredericGirod
Active Contributor
533

Maybe you could try to use external command on Linux/Unix like pdf2txt or pdf2word ... (you will have to install it).

But if your PDF is not always with the same layout, it will become quickly a nightmare, even with an OCR tool

Sandra_Rossi
Active Contributor
0 Kudos
533

You need to use external software to read PDF (unless it's a SAP Adobe Form generated via ADS) or develop your own ABAP "software" to decode it.