Skip to Content
avatar image
Former Member

Unable to get data in PDF - Webdynpro

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Apr 19, 2007 at 02:24 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Luciano Leite Da Silva

      Hi,

      I am also facing the same problem. I am able to see the binary data in the browser and not as PDF.

      Regards

      Vasu