createPDF usage

With createPDF sucessfully working, is it possible to use it to create a PDF to attach to an email all within PHP?

I'm familiar with how to attach files to emails, but wonder if there's a way of creating the PDF and not have it display as inline or a download but as a local file that I can then select to attach?

Thanks, Paul.

Re: [Jason] createPDF usage

Hi Jason,

It's OK thanks, I've worked out how to do it. Incidentally, I found that the code was producing an error which you might want to know about.

The call $data = createPDF_fromHTML($html); produced a warning message on line 76 of createPDF.php.
The line says unlink($tempPath); but at this point it seems that $tempPath doesn't exist, possibly as a result of the function call on line 72 (register_shutdown_function) but I'm not sure.

This error doesn't normally display because the function is usually followed up by outputting the PDF but thought you might be interested in having a look anyway.

Thanks, Paul.

Re: [pothompson] createPDF usage

By Jason - August 3, 2010

Hi Paul,

Great. Glad that's working for you.
Thanks for bringing the error to our attention.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

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