Skip to Content

Can I send output from CL_GUI_HTML_VIEWER to a pdf or to a spool file?

I am using CL_GUI_HTML_VIEWER to display an html form. Users enter some text and other data and then I need to be able to save the form to a pdf. Output to a spool file would also work.

Any ideas?

Add comment
10|10000 characters needed characters exceeded

  • Hi,

    I tried to generate spool by using above method.It's not working can you send me if you have any sample code.

    Thanks in advance.

  • Hello Prashanth,

    I did not find a way to generate a spool file or a PDF from the HTML form. The CL_ABAP_BROWSER provided by Horst Keller allows desktop printing of the display HTML. That worked well for me in testing. However, as happens sometimes, my users changed their minds on the requirement so I did not complete the code.

  • Get RSS Feed

1 Answer

  • Best Answer
    Feb 02 at 06:35 AM

    The browser control has a method EXECWB.

    See my demo class CL_ABAP_BROWSER that encapsulates CL_GUI_HTML_VIEWER and where method SHOW_HTML has a parameter PRINTING that allows to desktop-print the displayed HTML using that method EXECWB.

    Maybe you can go on further from this.

    Add comment
    10|10000 characters needed characters exceeded

    • Hello and thank you for the response.

      Your CL_ABAP_BROWSER class is excellent. I used the class in a small demo program for my business users with success.

      However (as often happens in the early stages of such ideas), the business users have now changed the requirements and have requested that we use a word document instead of html. I choose to look at this as an opportunity to explore a BDS solution.