‎2019 Dec 17 12:01 PM
Good day all.I am combining data I read from the database with a PDF. I then view the filled in PDF using cl_gui_html_viewer. It seems I have to save the filled in PDF to my desktop before I can view it. Is there a way to view the filled in PDF without saving it?
‎2019 Dec 17 12:13 PM
CALL METHOD pdf_html_control->load_data
EXPORTING
url = i_url
size = l_len
type = 'application'
subtype = 'pdf'
IMPORTING
assigned_url = l_url
CHANGING
data_table = l_pdf_data
EXCEPTIONS
OTHERS = 1.This is the code of the SP02, display PDF spool. There is no file
‎2019 Dec 17 4:57 PM
Mathew Laba Here is a Minimal Reproducible Example:
PARAMETERS dummy.
DATA go_html_viewer TYPE REF TO cl_gui_html_viewer.
AT SELECTION-SCREEN OUTPUT.
IF go_html_viewer IS NOT BOUND.
DATA: l_url TYPE cndp_url,
l_text TYPE string.
l_text = '<html><body><b>hello</b> <i>world</i></body></html>'.
go_html_viewer = NEW cl_gui_html_viewer( parent = cl_gui_container=>screen0 ).
data(soli_tab) = cl_bcs_convert=>string_to_soli( l_text ).
go_html_viewer->load_data(
EXPORTING type = 'text' subtype = 'html' size = strlen( l_text )
IMPORTING assigned_url = l_url
CHANGING data_table = soli_tab ).
go_html_viewer->show_url( url = l_url ).
ENDIF.
‎2019 Dec 17 3:56 PM
My implementation saves a file...then loads and displays. Can you point me to an example which I can take a look at? Thanks. Mat.