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: 

How to send HTML input File as output in PDF form in SAP ABAP

Former Member
0 Kudos

Hi,

I have one requirement. I will be getting html file as input. My requirement is to display the output in the PDF document. I am trying to use the spool id and converting it to the PDF using ' CONVERT_ABAPSPOOLJOB_2_PDF ' FM, but the output contains the html tags too.

For example I have the below

lv_string = '<html><B> Test String </B></html>.( This is the input ). Expected out put is 'Test String'( this should be in bold).I am putting this input in spool( by calling another report) without separating html tags. But required output on the PDF document should be 'Test String'( in Bold ). But I am getting the output as it is ''<html><B> Test String </B></html>' on the PDF output. I am not sure how to convert html to 'OTF' so that html tags will get removed with the converted output( In this case ' Test String ' in BOLD ). I used the class 'CL_CRM_HTML_PARSER' for parsing the HTML tags .But not sure how to convert into required output( in this case the output should be in the bold).

Thanks,

Baasanthi.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

I am closing this as my client is not going with this requirement.

Thanks.

4 REPLIES 4

former_member241258
Active Participant
0 Kudos

hi

i am giving two little ideas.

way 1: if there is possibility to convert that html document into xsf / xml document. that xml / xsf code will be display and take print in sap.

way 2: save html document in application server and print html document in pdf format on application server.

and last read that pdf document and display on sap.

roberto_forti
Contributor
0 Kudos

Hi Baasanthi,

Have you considered testing CL_GUI_HTML_VIEWER and after send to spool execute FM FPCOMP_CREATE_PDF_FROM_SPOOL?

Regards,


0 Kudos

Yes, I did consider but still not working.

Former Member
0 Kudos

Hi,

I am closing this as my client is not going with this requirement.

Thanks.