cancel
Showing results for 
Search instead for 
Did you mean: 

Adobe Form - PDF to Text file conversion

Former Member
0 Kudos

Hi People,

I have a requirement where the User wants to convert an Abobe form PDF document to a text file via an ABAP program.

This is quick and easy for SAP Scripts and SMART forms where we can convert the OTF data into Text using CONVERT_OTF function.

Btu I tried for PDF and i find not good way to convert as a text file.

I used the PDF data received from the FM,

,

    CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
  EXPORTING
    buffer                = ls_pdf_file-pdf
    IMPORTING
    OUTPUT_LENGTH         = lv_len
  TABLES
    binary_tab            = lt_solix.

   CALL FUNCTION 'SCMS_BINARY_TO_TEXT'
  EXPORTING
    input_length          = lv_len
   MIMETYPE              = 'application/pdf'
  tables
    binary_tab            = lt_solix
    text_tab              =  it_lines
EXCEPTIONS
   FAILED                = 1
   OTHERS                = 2

But the data in lt_lines is just junk. (looks like some XML coding)

Is there any way to convert PDF to TXT using ABAP.

Regards,

Mid.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Midhun,

I have the same requirement. Did you find any solution?

Neha