cancel
Showing results for 
Search instead for 
Did you mean: 

Creating Dynamic PDF Forms

Former Member
0 Kudos

Hi Firends,

we had one web dynpro Table in that we populate the values from Excel File

Now what we want to achieve is we have to design one standerd pdf forms ,and we will fetch each row value from the web dynpro table and populate in the pdf form and that pdf form should be saved in a seprate folder(suppose there are 10 rows in the table means 10 pdf files should be generated saved under a particular folder)

Help Us to achive the task

Thanks,

vino

Accepted Solutions (1)

Accepted Solutions (1)

amolgupta
Active Contributor
0 Kudos

hi Vinod,

<b>IN GENERAL</b>

all the UI elements in the adobe form are generally connected to your web-dynpro Context.

whatever you type in the online adobe form is reflected in the respective context attributes of the dynpro Context of the view where "ur Interactive form UI element is".

that means you can yourself fill the contents of ur interactive form by working on the get/set methods of the context attributes.

<b>UR CASE</b>

hmmm...

looks like ur talking about records...in a database... where each record represents one object.

one record from excel would be one pdf form...right

and one pdf has one equivalent <pdfobjectContextAttribute> with its type binary...right

what you can do is ...

put ur interactive form on the main view.

in the wdDoInit() method write the code that fethces the data from the EXCEL file.

put ur interactive form on the same view.]

go to interactive form->properties...

there are two imp properties....

dataSource = the context attribute that holds the pdf in binary

pdfSource = the node which has all attributes needed in pdf

put the first record in the node that is mapped to the dataSorce of the interactive form using the get/set methods on the Context attributes.

the pdfSorce which is mapped to the Context attribute will get populated with the pdf file that you need... right

now use the FileDownload UI element to download it....

Follow the same procedure for second, third.....n records....

you can also automate this process,

like once you feed the context... u get the pdf....

many times you feed the context, many times you get the pdf...

save the pdf in some array....may be in a node like multiple instances of a attribute(remember cardinality of a node)

ask the user for one base location...where all ur pdf's will be...

now that you got multiple pdfs for your records.

you need to save them on the file system.

try tweaking the file download UI element for saving multiple files in the filesystem.

because it asks for the storage location everytime you click on it.

or try using the java class "File" for handling.

i hope this will give you some idea....

with regards,

-Amol Gupta

Answers (2)

Answers (2)

krishanu_biswas
Active Participant
0 Kudos

Hello Vino,

You have not specified the NW version you are working on. Moreover, we do not know if you are trying to achieve the task in WD for Java or ABAP. These information are very useful to suggest something very concrete. I would also like to know a bit in more details about the task, for example, would you just like to create these 10 PDFs internally and store them in a directory or you would like to show them on the screen as well ? These PDFs are going to be interactive or disabled ? Are you using ActiveX or ZCI (native) technology ?

If it is on WD for Java, i would probably be able to suggest you something. If it is not, we will have to contact the ABAP specialists for the same.

Best Regards,

Krish

Former Member
0 Kudos

Do you know the answer already ?