Skip to Content
avatar image
Former Member

Generating a PDF in Web Dynpro without using InteractiveForms

Hello All,

I have been following this tutorial">> from SDN and is currently stuck.

<u><b>What I'll like to achieve</b></u>

1) User logs on to the system and a table displaying a list of items for approval appears.

2) the user is then able to select a row item from the table and click on 'approve'. In doing so, my application should generate a pdf form in the background and attach it as an email attachment and sent that email to an appointed vendor.


As there is no InteractiveForm involved, I do believe I will need to provide the template (.xdp) so that the PDF can be generated. In the tutorial, it suggests doing this (I modified it a little to reflect my own path name):

InputStream templateSourceInputStream = getClass().getClassLoader().getResourceAsStream("d:

However, I am given a NullPointerException when I attempt to do that. Does anyone has any idea what may have caused the error ? Thank you.


Kwok Wei

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Apr 12, 2006 at 10:34 AM

    Hi Kwok,

    The XDP file is stored on the server right ?

    Simply, access it using -

    File fileXdpTemplate = new File(filePathXdpTemplate);

    FileInputStream xdpTemplateInputStream = new FileInputStream(fileXdpTemplate);




    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Kwok Wei ,

      According to the convention the any file can be placed in the src/mimes/Components/<component package + component name>/folder of your webdynpro project along with other generated files of your application.

      After this you just need to pass the filename to the getResourcestream() method,it automatically picks up the file from the folder.


      Aarthi Mathivanan

      Message was edited by: aarthi mathivanan