I'm writing a small extension to display contributions in a format that is similar to our organization's invoices. I'd like to be able to export them as a PDF.
I found CRM_Utils_PDF_Utils::html2pdf(), and I've been trying to use this to generate PDFs. However, when I download the PDF, my PDF reader tells me that the file is either not a PDF, or is corrupted.
The following is similar to the code I'm using:
CRM_Utils_PDF_Utils::html2pdf($html, $invoiceName, FALSE, NULL);
Where $html is the generated HTML string and $invoiceName is a string containing the concatenated participant name and event name.
I guess I'm not certain what the 3rd and 4th arguments do. Any insight would be appreciated.