PDA

View Full Version : pdf popup



hampster
06 May 2009, 07:41 PM
I would like to use information in a form to create a pdf file in a popup window. I created a method outlined as follows:

use window.open to create a new window
use "document.write" to create a form populated with hidden elements in the popup. The values of these elements are set from the parent window.
the parent window then calls submit() on the popup window's form.

This works, but not with Safari, and it seems like a rather clumsy solution.

It does appear that target-"_blank" has been de-depreciated in html5, but this doesn't seem to work yet either- as there is no formal DTD for html5. Is there a more elegant/simple method out there?

Any help would be appreciated.
--Dave

is_numeric
07 May 2009, 02:02 AM
so you are already creating the PDF?

remember that the PDF reader is an application on the users machine so you cant force a pdf to open in a pop up as its a user preference setting. Some will open within the confines of a browser window, some will just open in the application window.

I suggest that if you want to retain the info in a pdf then thats fine but provide it in a link for download.