I am trying to generate some VERY simple PDFs based on some simple HTML output. My basic structure of expected output is:
Category Name 1
[Product Image 1] Product Name 1
[Product Image 2] Product Name 2
Category Name 2
[Product Image 3] Product Name 3
I can generate some very basic PDFs fine (I'm using DOMPDF 0.5) from my HTML. For example, a PDF with the content 'test' exports fine.
However, as soon as I try to insert even the slightest HTML markup, the PDF exports but no longer opens in Adobe Acrobat, instead giving the error:
'Adobe Reader could not open filename.pdf because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded).
Has anyone had a similar problem? It seems sometimes I can get the file to open with tags like <h1>test</h1> but generating a file with <p>pargaraph</p> would fail. Is there any solution or are there any better alternatives to using DOMPDF (provided the solution can be used on a shared hosting environment).
Cheers
exit(or similar) after? - alex