Skip to Content
author's profile photo Former Member
Former Member

Adobe Form - PDF to Text file conversion

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.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jun 13, 2012 at 07:47 AM

    Hi Midhun,

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

    Neha

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.