on 04-18-2007 11:08 PM
Hi All,
I want to get the report in the PDF in webdynpro application.
Problem i am having is, I am shown the text in the new browser but not coming it in the PDF. Its like showin as a HTML Page. Anyone pls let me know where i am going wrong.
Below is the code i written.
String slReport=new String();
slReport="Delivery Tracking Information Report";
byte[] pdfContent = slReport.getBytes();
IWDCachedWebResource pdfResource = WDWebResource.getPublicCachedWebResource(
pdfContent,
WDWebResourceType.PDF,
WDScopeType.CLIENTSESSION_SCOPE,
wdThis.wdGetAPI().getComponent().getDeployableObjectPart(),
"Xyz_");
try{
wdComponentAPI.getWindowManager().createNonModalExternalWindow(pdfResource.getURL(), "Report View").show();
}catch(WDURLException e){
wdComponentAPI.getMessageManager().reportException("URL not found", true);
}
Thanks......
Thanks,
Raghavendra Pothula
Anyone Pls!!!
Message was edited by:
Raghavendra Pothula
Hi Raghavendra Pothula
Try this code:
byte[] pdfContent = slReport.getBytes();
IWDCachedWebResource pdfResource = WDWebResource.getWebResource(pdfContent,WDWebResourceType.PDF);
IWDWindow window = wdComponentAPI.getWindowManager().createExternalWindow(pdfResource.getURL(), "Report View", true);
// Eliminate some features of the window
window.removeWindowFeature(WDWindowFeature.ADDRESS_BAR);
window.removeWindowFeature(WDWindowFeature.MENU_BAR);
window.removeWindowFeature(WDWindowFeature.STATUS_BAR);
window.removeWindowFeature(WDWindowFeature.TOOL_BAR);
window.setWindowSize(780,430);
window.setWindowPosition(20,140);
window.open();
This code work to me.
Regards,
Luciano
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Leite for help,
Even this doesnt works for me. Earlier itself i tried, and i dont want to use the deprecated methods. Still i am not able to get the output on the PDF. Problem is that its showing the Content in the browser rather on PDF. I strongly believe that this may not be with CODE.
Anyone pls help..
Thanks,
Raags
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.