on 08-10-2005 3:13 PM
I have a need to create and allow downloading reports in PDF format. To create the PDF files I plan on using iText.
My question comes in transferring the PDF files to the client. Is their a way in Dynpro to change the response content type and write the PDF to the response? Or is it possible/better to write the PDF somewhere accessible through a url and forward the request to that address?
I would also like to store the PDFs anyway if possible so that if the same reports is requested multiple times it doesn't have to regenerate the report each time. I am just not sure of what capabilities I have in Dynpro yet for accessing the ServletResponse object or the file system for storing the PDFs.
Hi Brook,
Also, refer to the following thread "Problem with PDF show"
https://www.sdn.sap.com/sdn/collaboration.sdn?node=linkFnode6-1&contenttype=url&content=https://
This will be very much useful.
Regards,
Santhosh.C
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Brooks,
1. You can create the PDF files in a folder (eg. C:\Brooks\Output) in your WAS server.
2. Create a http alias as "brooks" and point it to the output folder.
3. On click of a link or button, open URL of the PDF file.
I hope this is clear, if you need any further clarification do let me know.
Regards,
Santhosh.C
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The downside to that is the reports are publicly accessible. I may not want everyone to be able to download all reports. Although I could limit what links are visible to the user, there is nothing stopping them from guessing or otherwise getting hold of links meant for others.
In the past I have written servlets that validate the user's ability to access the file and then set the appropriate content type and transfer the file without the user ever knowing the file name, path on the server, or anything else the file may have come from.
But thank you, that will probably be the route I go. If I do I will come back and give you the full points.
Hi .. You don't have to create any Http Alias , Here is my suggestion ...
1. Create PDF file ( using iText Lib or Fileupload .. ) to a specific folder in WAS server
2. Use the FileDownload UI component to get the file in your WebDynpro Application . Of course , you have to turn on the Authentication property of your WebDynpro Application if you want to know who is using your application and he or she has the right to get the file or not
Sorry for my poor English .. Have a nice day _
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.