Skip to Content

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

Feb 02 at 02:34 AM


avatar image

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?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Horst Keller
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.

Show 1 Share
10 |10000 characters needed characters left 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.