cancel
Showing results for 
Search instead for 
Did you mean: 

Creating .PDFs from pure strings, tables ...

Former Member
0 Kudos

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?

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member583013
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

Thank you