on 01-11-2007 5:20 PM
Hello,
my purpose is to open a pdf file directly without getting a dialog box. How can i do that? Until now i used the following code:
IWDWindow newwindow = wdComponentAPI.getWindowManager().
createExternalWindow(mainUrl2,"Document Preview",false);
newwindow.open();
The pdf is not stored local. I get the url from the Web As.
regards,
sharam
Hi Sharam,
if you use FileDownload you always will get the open/save dialog, if you want to display the pdf in your view you could use IFrame, but you should not, because IFrame is deprecated. So do as Bertram suggests in the thread I mentioned before.
Kind Regards
Stefanie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Stefanie,
you are right, if I use the FileDownload I will get always the open/save dialog. Ok, I can live with it. But after the open/save Dialog I get an another Dialog with the message:
Windows can not open this file.
(Radio Buttons)
- Use the Web Service to find the appropriate Program
- Select the program from a list
I think the problem is that I opened the file from a Server, so there is no extension with .pdf in my url. Is there a way to solve this problem?
regards,
Sharam
P.S.: I can not use Interactive Forms
url:
Hallo Sharam,
what's your SAP NetWeaver release? SAP NetWeaver 04 or 04s? Within SAP NW 04s there is the possibility to open a downloaded file "in place":
You can dynamically set the behavior property of the FileDownload-UI-element. The enumeration type WDFileDownloadBehaviour determines how the downloaded file is represented on the client. This property can have three different values:
<b>AUTO</b>: The behaviour is predefined and depends on the mime type of the downloaded file.
<b>ALLOW_SAVE</b>: An open/save dialog asks the user.
<b>OPEN_INPLACE</b>: The file will be opened in place in the web page with the browser-embedded application program.
Now to your second problem: "Windows cannot open this file". This is based on the fact that you do not correctly set the MIME type of the uploaded resource within the MofifiableBinaryType metadata (attribute info) of the context attribute storing the byte array. Or when you develop in NW04s you did not correctly set this MIME type within the resource object of type IWDResource.
Best regards, Bertram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Stefanie,
how can I use the following code, if I have to get my document from the Web As. The location of my pdf file is:
url:http://testSystem:1009/sap/bc/contentserver/800?get&pVersion=0046&contRep=L1&docId=E04B5F341751CE4399B1B91738F5D02A
So i can not use the following code:
pdfUrl =
WDWebResource
.getWebResource(wdComponentAPI.getDeployableObjectPart(), WDWebResourceType.PDF, "<pdf file name>.pdf")
.getURL();
If I bind my url directly to the context of my ui I get the window dialog box and that is not my purpose.
Thanks for your replay.
regards,
Sharam
Hi.
<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/c8/32cc6922fb6040a768652aaa0b6879/frameset.htm">File Download API with usage options</a>
Regards
Bharathwaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.