createPDF - save pdf to server and don't output

5 posts by 3 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: June 12, 2012   (RSS)

Re: [rjbathgate] createPDF - save pdf to server and don't output

By Jason - June 11, 2012

Hi Rob,

We could do some customization to the createPDF plugin to do this. Please contact consulting@interactivetools.com and we can go over some options.

Thanks,
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] createPDF - save pdf to server and don't output

By rjbathgate - June 11, 2012

Done, email sent.

Cheers

Re: [rjbathgate] createPDF - save pdf to server and don't output

By Dave - June 12, 2012

Hi Rob,

Also, have a look at the functions in createPDF.php and the examples, some of them return $data with the PDF content. You could just call:
file_put_contents('yourfile.pdf', $data);

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] createPDF - save pdf to server and don't output

By rjbathgate - June 12, 2012 - edited: June 12, 2012

5 stars to Dave.

$url = "http://www.google.com";
$data = createPDF_fromUrl($url);
file_put_contents('myfile.pdf', $data);

// my PDFMerger script below
$pdf->addPDF('myfile.pdf', '1')
->addPDF('myotherfile.pdf', '1-2')
->addPDF('myotherfile2.pdf', 'all')
->merge('download', 'myoutput.pdf');


works a treat, many thanks :)

Rob