Skip to Content
0
Former Member
Mar 09, 2007 at 10:53 AM

PDF Rending in Web Dynpro Unknown.pdf

20 Views

I am getting a pdf document from R/3. I get the byte[] from the context node.

The num bytes returned is >0 however when I render the pdf as follows I get a black pdf document displayed and I notice that unknown.pdf the generated url.

BTW, I don't see any way to set the filename. I don't want unknown.pdf in the url.

byte[] pdfContent = wdContext.currentContextElement().getPdfDokument();

try {

IWDWebResource pdfResource = WDWebResource.getWebResource

(pdfContent, WDWebResourceType.PDF);

wdComponentAPI.getWindowManager().createExternalWindow(

pdfResource.getURL(),"Title",

false).open();

} catch (WDURLException e) {

e.printStackTrace();

}