To this question I can answer because I am doing the PDF integration right now.
Yesterday it has worked nice for the first time with images, and I keep going to offer you the feature when it works well.
My investigations :
PDF lib has been removed from Joomla 3. I don't know the reason.
In past I have done a project with FPDF, but I am now using : DomPdf
pxd.me/dompdf/www/examples.php
Very good, and convert HTML, so for Cook integration it is perfect.
Also FPDF is very limited to rotate text and many others limitations.
I tried the example code given on Joomla documentation. But it does not work in fact because it calls the document instead of the view.
For the moment I am not using JDocument.
When you set format=pdf in url, Joomla is searching for view.pdf.php (Your view file)
Simply create a super PDF VIEW class inherinting XxxxClassView
In this super class, redefine display() in order to catch the generated template, and send it to render to domPdf.
Then, the images should not be loaded indirectly, but from direct url if you want it to work.
Because domPdf is retreiving automatically the real physical path on hdd.
It retreives also CSS physical files in order to parse them. (Not tested css for the moment)
Today I am gonna rewrite the way to acces files. Directory markers will stay the same, but more convenient to play with files :
- Indirect access (through controller)
- Access by direct url
- Retrieve physical file on hdd.
For the moment still searching to make it working.
Another issue I have encountered, you must have a container markup (div) for the whole template result because dompdf seems to decode only the first XML node (HTML in our case)
If you do not transform your native generated template, an error will occur :
" Error : Extra content at the end of the document"
Hope it helps. This new feature will not be available tomorrow. I must do it first and then test it for months before to propose you in Cook.