Skip to Content
author's profile photo
Former Member

Creating .PDFs from pure strings, tables ...

Hello, I wonder how the WebAS can create PDFs. No sending back an xstring with .pdf-content back to client. There are several topics about setting the mime-type and so on.

I mean real creating from plain string text, an internal table, or anything else.

Is such a functionality integrated in the WebAS at all?

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • author's profile photo
    Former Member
    May 06, 2004 at 07:05 PM

    Hi Peter,

    Hope I understood your question correctly. Do you want to create a PDF stream out of a String or other ABAP internal variables/structures ?

    PDF is more visual in nature, since it is used for presenting text/graph/picture in a document format. So, the content of PDF is not only ASCII strings, but also font and raster details.

    So, in order to convert a variable value, (example: 'Hello ABAP PDF World' stored in a variable L_MESSAGE) you need to print this using 'WRITE' statement (or using Smartforms/Sapscript) create a spool output first. Then the spool content can be converted to PDF format using functions like CONVERT_ABAPSPOOLJOB_2_PDF, CONVERT_OTF etc... (check out function group 'STXW').

    Hope it helps.

    Venky Varadadesigan

    SAP NetWeaver consulting.

    Add comment
    10|10000 characters needed characters exceeded