on 04-23-2008 2:14 PM
Hello@all,
I have a PDF-File, which I have stored in my project like a image
(->src->mimes->Components->com.sap.....Comp--->Help.pdf
In the View of this Component I want to have a LinkToURL or something else to open the PDF file with adobe.
Can someone help me for this?
Best regards
Marcus
Hi,
You can alternatively open Pdf using the following logic
String pdfLink = <Your Link>
FileInputStream fileIn = new FileInputStream(pdfLink);
int lastIndex = pdfLink.lastIndexOf(Constants.PATH_SEP);
String saveFileName = pdfLink.substring(lastIndex);
IWDResource resource = WDResourceFactory.createCachedResource(fileIn, saveFileName,WDWebResourceType.PDF,true);
String url = resource.getUrl(WDFileDownloadBehaviour.OPEN_INPLACE.ordinal());
wdComponentAPI.getWindowManager().createNonModalExternalWindow(url,saveFileName).show();
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Insert a Iframe element and in the source give the file name.
It should show up within the space provided.
Do give comments if it works or not
Thanks
Srikant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.