Forums

Generate PDF and show it on submit

hitko 02 Feb, 2012
I made php script using FPDF that generates PDF with form content included. I can store that on server (therefore I know it works as it should), but I have no idea how to show it along with Thanks message (without storing it on server).
GreyHead 02 Feb, 2012
Hi hitko,

What is the problem with storing it on the server?

If you look at the workings of the CSV Export action in CFv4 RC3.0+ you'll see code to handle file downloads with or without storing them.

Bob
hitko 02 Feb, 2012
Form is used for users to submit their personal data and therefore it mustn't be stored on server due to privacy terms and so on. Let's just say I don't want it to be stored outside server memory.
I want form to be displayed inline, like when using Output('name.pdf','I'); in fpdf. When I use this in custom code along with other code to make my pdf, it displays a zilion of random characters instead of embedded pdf file. I actually don't want file downloaded, just displayed together with thanks message so uusers can print it (it has print button included).
GreyHead 02 Feb, 2012
Hi hitko,

I understand why you don't want it saved - but if it's just for printing why use pdf at all? Won't an HTML page in a new window work as well?

I'm afraid that I don't know how to embed a pdf from memory into an HTML page :-(

Bob
hitko 02 Feb, 2012
Thanks for help anyway. I hope any other user knows how to do that.
This topic is locked and no more replies can be posted.