Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

PDF in browser rendered as Text

We're trying to render SMARTFORMS outpur as PDF within our WebDynpro

application. We've found several posts which have been very helpful

and I think we're close. When we try to show the pdf a client browser window

is spawned and the content is rendered as text within the browser (shown below).

It looks like I'm not setting the content-type in the response header correctly.

Below is the code we're using.

Much Thanks,


/* Code used to launch browser and view PDF */

  String file_prefix = "rfq";

   IWDCachedWebResource pdfResource = WDWebResource.getPublicCachedWebResource(
   			pdfContent, WDWebResourceType.PDF, WDScopeType.CLIENTSESSION_SCOPE,
   			file_prefix );

   wdComponentAPI.getWindowManager().createExternalWindow( pdfResource.getURL(), "RFQ", false).open();

/* First few lines of rendered document */
2 0 obj
/Type /FontDescriptor
/Ascent 720
/CapHeight 660
/Descent -270
/Flags 34
/FontBBox [-177 -269 1123 6]
/FontName /Times-Roman
/ItalicAngle 0
/StemV 105

Former Member
Not what you were looking for? View more on this topic or Ask a question