cancel
Showing results for 
Search instead for 
Did you mean: 

Help!!! Blank Window inplace of PDF window

Former Member
0 Kudos

Hi Friends,

We need to show the PDF on a external window. We get the PDF content from ABAP in byte[] format. Infact we are able to get the this done using the FileDownload Control, where we are able to open the PDF, save with perfect content.

BUT problem is with the scenario where we dont want the file download dialog, simply popup should open and the pdf should be shown.

Somehow from the forums we got the code and implemented the same, BUT the problem is we are able to get popup external window but its BLANK., i mean we are not getting the PDF.. not even ADOBE ACROBAT is loading.

Please help!!! We are struggling from past 3 days...!!! Your help would be valuable...!!!

<i><b>try {

IWDWebResource pdfResource=WDWebResource.getWebResource(

wdContext.currentContextElement().getFilesource_1(),

WDWebResourceType.PDF

);

wdComponentAPI.getWindowManager().createExternalWindow(pdfResource.getURL(),"receipt view",true).open();

} catch (WDURLException e) {

msgmgr.reportException(e.getMessage(),true);

}</b></i>

Thanks,

Raghavendra P

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

This is how i got solution...

<i><b> try {

String key = "order-receipt-999";

IWDCachedWebResource pdfResource = WDWebResource.getPublicCachedWebResource(

wdContext.currentContextElement().getFilesource_1(),

WDWebResourceType.PDF,

WDScopeType.CLIENTSESSION_SCOPE,

wdThis.wdGetAPI().getComponent().getDeployableObjectPart(),

key);

wdComponentAPI.getWindowManager().createExternalWindow(pdfResource.getURL(), "my window name", false).open();

} catch (WDURLException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}</b></i>

Former Member
0 Kudos

Hi Raghavendra,

I'm trying to show a pdf, but when I write the code you suggested to use I get an error and it's in the pdfResource.getURL()..it says that this cannot be resolved.

Any hints?

Thanks in advance.

Jesus

Former Member
0 Kudos

Hi,

Try to use the 'Organize Imports' coz, initiall the code couldnt able to get the package's required for that classes. Try to get the packages using the organize imports and then you should see the compile error free code. do let me know, if you cant find the solution.

Thanks,

Raghavendra P

Former Member
0 Kudos

Hi Raghavendra,

I already try the thing that you told me. Do you know any other hint?

Thanks in advance.

Jesus