2010 Jan 28 11:00 PM
Hi Friends,
I am downloading the HTML file from my ABAP report. It will contain HTML tags ( i.e for Table, Pictures ). Here Pictures are coming from DMS Server. It is downloading on the presentation server perfectly.
Now Customer wants to download that as a PDF. I tried in SDN and Funtion Modules from ABAP. But i did not get any solution.
Can anyone suggest how we can convert the file as PDF from ABAP.
If not possible How can i call external conversion ( i.e Java, PHP ) from ABAP.
Regards,
Srinivas Bhavanam
Hi Friends,
I am downloading the HTML file from my ABAP report. It will contain HTML tags ( i.e for Table, Pictures ). Here Pictures are coming from DMS Server. It is downloading on the presentation server perfectly.
Now Customer wants to download that as a PDF. I tried in SDN and Funtion Modules from ABAP. But i did not get any solution.
Can anyone suggest how we can convert the file as PDF from ABAP.
If not possible How can i call external conversion ( i.e Java, PHP ) from ABAP.
Regards,
Srinivas Bhavanam
2010 Jan 29 5:12 AM
Hi,
One way is to submit the report to the Print Spool like where p_repid is your report id which you want to convert.
-
submit (p_repid) to sap-spool without spool dynpro
spool parameters mstr_print_parms
via selection-screen
and return.
-
Then convert Spool to PDF using the function module "CONVERT_ABAPSPOOLJOB_2_PDF"
Finally, download the file using the function module "DOWNLOAD"
Hope this helps.
Suman
2010 Jan 29 2:05 PM
Hi Suman,
Thanks for your quick response.
I am preparing HTML code and passing it to my internal table. Then i am dowloading and excuting with forntend classes. Here i am confused about how it will go to the spool.
Regards,
Srinivas Bhavanam
2010 Jan 29 5:22 AM
2010 Jan 29 2:09 PM
Hi Ritesh,
I have gone through the link. I know advantage of layouts. Here i want to display DMS Server pictures which are there in JPG format. That is why i am going through the HTML page design.
Regards,
Srinivas Bhavanam
2011 Jul 27 2:47 PM
Hi Srinivas,
I have the same requirement and the same issue.
Were you able to convert the HTML file to PDF?
Thanks,
Oscar
2011 Jul 27 6:42 PM
Put o/p html file on server using dataset. Write a server script/command to convert to pdf file. Server script should be capable of converting your html to pdf and embed images on pdf file. Use New generated PDF file, store it on spool or print it.
Regards,
Nitesh
2014 May 07 5:53 PM
2014 May 07 6:58 PM
Hi,
In this article I show how to create native Excel using ABAP and Java.
http://scn.sap.com/community/abap/blog/2013/12/15/creating-excel-the-java-way
There are some Java PDF library that can be used:
http://java-source.net/open-source/pdf-libraries.
Also google for html to pdf convertors
Regards.