on 04-04-2006 5:57 AM
Hi,
I have requirement PDF function (PDF interface is dictionary based ) should be called in a loop and final all pages should dispaly in HTML container or BSP pages.
I have tried by calling the PDF in a loop and appended the PDF string fpformoutput-pdf to a field ( <b>pdfresult type XSTRING</b>) . Though the final string is showing total length of all appended PDF strings , in the output the last appended PDF only displayed.
I have used the following code to display the PDF in HTML container, but only last page is coming for diaplay.
l_len = XSTRLEN( pdfresult ).
WHILE l_len >= 1000.
l_pdf_line = pdfresult+l_offset(1000).
APPEND l_pdf_line TO l_pdf_data.
ADD 1000 TO l_offset.
SUBTRACT 1000 FROM l_len.
ENDWHILE.
IF l_len > 0.
l_pdf_line = pdfresult+l_offset(l_len).
APPEND l_pdf_line TO l_pdf_data.
ENDIF.
CALL METHOD pdf_html_control->load_data
EXPORTING
url = 'smart.pdf'
size = pdf_size
type = 'application'
subtype = 'pdf'
IMPORTING
assigned_url = l_url
CHANGING
data_table = l_pdf_data
EXCEPTIONS
OTHERS = 1.
Please let me know how should proceed to solve the problem.
Thanks and Regards,
Pavan Meda
Without going into too much detail, here's some information from development:
As the Internet Explorer plug-in of Adobe Reader is not able to display all PDF files at a time, you cannot append all your PDFs and will need to keep them in a table, and create some kind of button navigation to switch from one PDF to the next and/or back.
The load_data data provider also has a limitation in that it caches information. So if all your PDFs are called smart.pdf, you can try to navigate to the next and the one after, but will always see the first one. So: You'll need to give each file a separate name, e.g. smart1, smart2,...
For more information, see Include LFPCOMPPRV on the print preview.
According to development, this is something consultants spend hours on...
Kind regards,
Markus Meisl
SAP NetWeaver Product Management
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.