on 01-14-2008 8:44 AM
Dear Frds
I have to open a pdf file when i click the button...
the pdf file should be kept in the application
using webdynpro....
How to keep the pdf file in my application
or how to keep pdfile resource in server....
Thanks in advance
G .kumar
Hi Shravan,
I suggest storing the PDF inside your mimes folder and if you have to internationalize it apply two-letter for the different countries (en, fr, es, it, ...).
Create a context element of type IWDResource to map document to, generate the url with the following code and add the content of your context element to a FileDownload ui element.
String currentFileName = "MYFILE.pdf";
String resourcePath = WDURLGenerator.getResourcePath(wdComponentAPI.getDeployableObjectPart(), currentFileName);
IWDResource resource = WDResourceFactory.createCachedResource(new FileInputStream(new File(resourcePath)),
currentFileName,
WDWebResourceType.PDF,
true
);
wdContext.currentContextElement().setFileResource(resource);
regards,
Christian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shravan,
Instead of button use FileDownload UI element to do this. Refer to this [PDF|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00062266-3aa9-2910-d485-f1088c3a4d71] for any reference on FileDownload UI element usage.
Regards
Sid
Edited by: siddharth chauhan on Jan 14, 2008 2:41 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.