on 09-29-2005 4:14 PM
I'd like to use the CachedWebResource to display a pdf in an IFrame/external window/etc, but am having issues...
1) The pdf never shows up in the IFrame or external window... Only a blank screen. I can change the resource type to XML and use an xml file, and it works fine. What am I missing?
public void onPlugIn(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onPlugIn(ServerEvent)
IWDCachedWebResource cachedResource = null;
String pdfUrl = null;
byte[] pdf = <i><get the file></i>;
if (pdf != null) {
cachedResource = WDWebResource.getWebResource(pdf, WDWebResourceType.PDF);
try {
pdfUrl = cachedResource.getURL();
wdContext.currentContextElement().setUrl(pdfUrl);
}
catch (WDURLException e) {
IWDMessageManager mgr = wdComponentAPI.getMessageManager();
mgr.reportException(e.getLocalizedMessage(), true);
}
}
//@@end
}
2) When I switch the resource type to xml, and use an xml file that is very, very large (but still valid), I get the following error trying to display the CachedWebResource in the IFrame.
<b>XML document must have a top level element. Error processing resource 'http://<i><server></i>:50000/webdynpro/dispatcher/local/Rep...</b>
Are there size limitations with the CachedWebResource? Any ideas?
Thanks,
-Dave
Hi David,
Did you got the solution for the problem. We are facing the same issue here.
Window popups with the empty screen. Please let me know the solution for this.
Code is perfect, but couldnt get the result.
Thanks,
Raghavendra P
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
Are u able to open a pdf in your browser.
I think its the problem with your browser
Regards
Bharathwaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
anyone?
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 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.