Page 1 of 1

Create PDF on page

Posted: Sun Mar 02, 2014 8:23 am
by testuser
Hi,

I need to create a PDF with user-defined variables (let´s say as GET parameters). Is it possible? It´s not an invoice, e-shop or st. like that, just I have to defined PDF template and put there a few variables.

Ex.
URL:

Code: Select all

example.com/page/?p1=name&p2=phone&p3=location
PDF template:

Code: Select all

Hi {$smarty.get.p1},
your location is {$smarty.get.p2} and your phone number is {$smarty.get.p3}.
On page "page" will be a button "generate PDF", after click that the PDF will be generated and available for open/download.

Is there any module? I´ve found only old PDFGenerator, but is makes st. different (and doesn´t working in current CMSMS version).

Thanks.

Re: Create PDF on page

Posted: Sun Mar 02, 2014 6:58 pm
by rotezecke
i use mPDF (not a module)
http://www.mpdf1.com/mpdf/index.php

Re: Create PDF on page

Posted: Sun Mar 02, 2014 10:58 pm
by paulbaker
Yes I used mPDF for a non-CMSMS project, it worked well.

Re: Create PDF on page

Posted: Mon Mar 03, 2014 1:57 am
by JohnnyB
I use the PDF module and get the URL link it generates to create a PDF and then use that link hardcoded in a page without using the module's link tag. I can't remember why I had to do it that way, but it works well and you could add your query string stuff to that link. That way, you are not using the module tag as the print link, but a mash up of your query strings and the originally generated pdf print link.

Re: Create PDF on page

Posted: Wed Mar 05, 2014 2:55 pm
by polodesign
JohnnyB - which PDF module are you referring to?

I'm considering ways to have a client input meeting minutes directly into a site via the admin, then be able to generate PDF's for printing or distribution via email.

Thanks in advance,
Penny

Re: Create PDF on page

Posted: Wed Mar 05, 2014 4:09 pm
by JohnnyB
polodesign wrote:JohnnyB - which PDF module are you referring to?
I'm using PDFGenerator.
The CMSMS ver 1.11.10 and it works well

Re: Create PDF on page

Posted: Wed Mar 05, 2014 5:28 pm
by polodesign
Thanks - the 'stale' note worried me. Glad to know it works well.

P.