on 2005 Feb 15 3:55 PM
Hello!
If I download PDF internal table (for example, converted from spool) to file, I can easily display it in a CL_GUI_HTML_VIEWER control. Is there a way to pass PDF data directly to HTML viewer, without using intermediate file?
Thanks!
Kind regards,
Igor Barbaric
You need to use the following methods of htmlviewer class
call method l_html_control->load_data
exporting
type = 'text'
subtype = 'html'
importing
assigned_url = l_url
changing
data_table = l_new_html_page
exceptions
others = 4.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
call method l_html_control->show_data
exporting
url = l_url
exceptions
others = 3.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
l_new_html_page will hold the PDF data and also
type = 'text'
subtype = 'html'
has to maintained for PDF.
I havent tried this but it should work.
Regards
Raja
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to convert pdf table (tline) to byte mode.
types: pdfx(134) type x.
data: lt_pdf type standard table of tline,
lt_pdfx(134) type standard table of pdfx,
lv_cline(134) type c.
field-symbols: <xline> type x.
loop at lt_pdf into lv_cline.
assign lv_cline to <xline> casting.
append <xline> to lt_pdfx.
endloop.
call method html_control->load_data
EXPORTING
url = 'file.pdf'
size = bytecount
type = 'application'
subtype = 'pdf'
IMPORTING
assigned_url = l_url
CHANGING
data_table = l_pdfx[]
EXCEPTIONS
others = 1.
User | Count |
---|---|
79 | |
10 | |
10 | |
10 | |
10 | |
9 | |
8 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.