Skip to Content

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

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Apr 10 at 11:23 PM

    Hi,

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

    Thanks.

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 28 at 06:16 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 28 at 11:57 PM

    Hi Baasanthi,

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

    Regards,


    Add comment
    10|10000 characters needed characters exceeded