cancel
Showing results for 
Search instead for 
Did you mean: 

pdfSource is null, how to find out when pdf is rendered completly

Former Member
0 Kudos

Hi guys,

I need the rendered pdf as a Stream, but I have no clue how to find out when the pdf has finished rendering, so that I can get the pdfSource.

I have the following scenario:

- button click opens a new IE window which will call a WD application

- application window will read all relevant data by delegation an action from default plug to the component controller

- the view embedded in the window contains only the interactiveForm

so far, this works fine

- but when I try to get the pdfSource now it is always null. I think this happens because the pdf is not rendered completly when I try to get the pdfSource.

So how to find out when rendering has finished and pdfSource is filled correctly?

Some more info:

- InteractiveForm is bound to a context Element from with type binary

- there is no feedback from generated pdf - no user klicks, when it is generated, but is has to be shown anyway

- it is a large PDF, about 10 - 20 pages of data, so rendering may take some time

Thx in advance

Fabian

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

I am facing same problem.

Did you get any solution?

Is there any way to render PDF programatically?

Regards,

Apurva

Former Member
0 Kudos

Hi,

as there is no event fired when the pdf is rendered there is no chance to get the pdfSource when it rendered completely.

1) You can add a button to your pdf with a small javascript which will trigger th submitAction inside the view you embedded the interactive form. When the button is pressed the pdf is rendered and the pdfSource is filled correctly.

If you can't add a button to the pdf, there is no way to get a rendered form. We made a little workaround, which works fine, but it's dirty ...

showview - a view containing a view container and a button (not visible or disabled) in another WD

pdfview - the view containing the interactive form

2) use your showview and add the pdfview to the view container, trigger the pdfview via plug and enable the button. You can press the button only if the pdf was rendered completely and this ensures that pdfSource is filled correctly

But also in the 2nd way, you need an interaction from the user, I still have found no way to automize this process.

Please keep in mind that the pdf is not persisted on disc, it is only in the server cache, so this will work only as long as you are the same browser session.

If you find a way to automize, please update ths thread as it would simplify my work around

Regards,

Fabian