2005 Feb 03 4:16 PM
Hello!
Is it possible to display a PDF contained in an internal table on an Enjoy control? I saw a component CL_GUI_PDFVIEWER, but it looks like it was ment only to display a PDF file stored on a workstation (or app server, whatever).
I know: I could download an internal table to a PDF file and then use CL_GUI_PDFVIEWER. However, I'd like to skip the file and do it directly.
Is there a way?
Thanks!
Kind regards,
Igor Barbaric
Hello!
Is it possible to display a PDF contained in an internal table on an Enjoy control? I saw a component CL_GUI_PDFVIEWER, but it looks like it was ment only to display a PDF file stored on a workstation (or app server, whatever).
I know: I could download an internal table to a PDF file and then use CL_GUI_PDFVIEWER. However, I'd like to skip the file and do it directly.
Is there a way?
Thanks!
Kind regards,
Igor Barbaric
2007 Apr 30 2:56 PM
Hi Igor
I have the same problem. Do you have the solution.
I hope you can help me.
Kind regards
Per Larsen
2007 Apr 30 3:41 PM
Hi igor,
1. Not sure, but may be this FM can help HR_IT_DISPLAY_WITH_PDF.
2. It expects the data to be OTF internal table format.
regards,
amit m.
2013 Oct 15 3:09 PM
Hi Igor,
we use the function module SSFCOMP_PDF_PREVIEW to display a PDF preview. The input is the OTF stream from smartform.
Best regards
Christian
2013 Oct 15 7:27 PM
Hi, Christian,
It was so long time ago, it's strange to see such an old thread still active. Anyway, thanks for the input! Also, thanks and appologees to Amit and Per. Meanwhile, I was using the HTML control to do it. I found this code in my demos, I guess I dig it out also somewhere from SCN (it was originally showing SmartForm, but I left this part out):
DATA:
lo_html TYPE REF TO cl_gui_html_viewer,
l_url TYPE w3url,
lt_pdf_bin_onefield TYPE TABLE OF char134,
gt_pdf TYPE TABLE OF tline
lt_pdf_text TYPE TABLE OF char255.
FIELD-SYMBOLS:
<ls_pdf> LIKE LINE OF gt_pdf,
<ls_pdf_bin_onefield> LIKE LINE OF lt_pdf_bin_onefield.
* convert 2-field itab to 1-field itab
APPEND LINES OF gt_pdf TO lt_pdf_bin_onefield.
* convert binary to text table
CALL FUNCTION 'SCMS_BINARY_TO_FTEXT'
EXPORTING
input_length = g_filesize
mimetype = 'application/pdf'
TABLES
binary_tab = lt_pdf_bin_onefield
ftext_tab = lt_pdf_text.
* create HTML object
CREATE OBJECT lo_html
EXPORTING
parent = cl_gui_container=>default_screen.
* load PDF data (get URL)
CALL METHOD lo_html->load_data
EXPORTING
type = 'text'
subtype = 'pdf'
IMPORTING
assigned_url = l_url
CHANGING
data_table = lt_pdf_text.
* show HTML control with PDF
lo_html->show_url( l_url ).
Cheers,
Igor
2013 Oct 16 10:49 AM
Hi Igor,
the FM does the same. It calls although a HTML container to show the PDF .
I activate this thread, because I though the answer wasn't complete. I was although looking forward to such a solution.
Best regards
Christian
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |