cancel
Showing results for 
Search instead for 
Did you mean: 

Regd PDF Printing from Web Dynpro

Former Member
0 Kudos

Hi,

We are using NW04s SP10 . I need to show the data coming from RFC as PDF in Web Dynpro. The RFC is returning String as output after SAP Script is converted to PDF . Below is the code i have written in WD for opening as PDF. When i try to open it as PDF, I am getting message in acrobat reader "<i>The file is damaged and could not be repaired</i>" . Did anyone faced the similar problem before?


//Converting the string to binary
 b = wdContext.nodeOutput().nodeBinary_File().getBinary_FileElementAt(i).getBin_File().getBytes();
  pdfResource=WDWebResource.getPublicCachedWebResource(b,WDWebResourceType.PDF,WDScopeType.CLIENTSESSION_SCOPE,wdThis.wdGetAPI().getComponent().getDeployableObjectPart(),"Test"+i); 
pdfResource.setResourceName("test.pdf");
   wdComponentAPI.getWindowManager().createExternalWindow(pdfResource.getURL(),"Test"+i,false).open();	

Thanks,

Vasu

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi all,

I am able to solve myself. The problem is with the generated data. Now i am able to see the PDF but i am facing issue in showing the data in pdf which i have posted in another thread.

Thanks,

Vasu