Issue with PDF output

jfquestiaux

Well-Known Member
I am trying to output a PDF version of a detail view (an invoice) and encounter the following problems :

  • When I enable "PDF button" in the form settings, I get a notice on the detail view: Notice: Undefined property: FabrikFEModelForm::$_rowId in /home/livingjfq/public_html/j3/components/com_fabrik/views/form/view.base.php on line 354
  • There is an encoding problem with special characters (see screenshot)
  • The data pulled from the record are missing - in fact, the id is missing in the url which causes the error above. If you edit manually the url and add the rowid, then the data are correctly included
  • The inline styles of the PDF template are not taken into account (but maybe this is the expected behaviour and you need to use an external CSS file?)
  • The PDF file downloaded has "-1.pdf" as filename (for rowid=1).
This is a very important issue for my project.
 

Attachments

  • 2013-02-13 10.48.58.png
    2013-02-13 10.48.58.png
    24.7 KB · Views: 341
When I enable "PDF button" in the form settings, I get a notice on the detail view: Notice: Undefined property: FabrikFEModelForm::$_rowId in /home/livingjfq/public_html/j3/components/com_fabrik/views/form/view.base.php on line 354

fixed

There is an encoding problem with special characters (see screenshot)
I don't see that - I saved a record with 'Fran?ais' as a field value. The table collalition is ' utf8_general_ci' and it saves and displays ok in the form, details and pdf view.

The inline styles of the PDF template are not taken into account (but maybe this is the expected behaviour and you need to use an external CSS file?)
Inline styles like:

Code:
<div style="font-weight:bold;color:red">test</div>
work for me

I guess putting a <style> declaration in the content might not - in which case an external css file would be preferable. With what is or isn't possible with the pdf generation we are limited by the library we use (dompdf).

The PDF file downloaded has "-1.pdf" as filename (for rowid=1).
That might be related to other points I've fixed but for me now it contains the form's label plus the row id as the file name.
 
After updating to 3.1b + GitHub17, here is the situation:

  • Icons issue is gone. The print and PDF work fine
  • The inline CSS are taken into account. Just be careful that some properies are not handled by the libray, like "float" for instance (that was my probelm). Like for email templates, it is safer to use tables (although nested tables don't work!)
  • The issue with the encoding is still there. I know this can be a pain to figure out, but I tested on both Mac (Firefox) and PC (IE9) and get the same result (see attached file).
  • Although the form label is "Mes factures", I get "-1.pdf" as filename.
 

Attachments

  • invoice.pdf
    265.3 KB · Views: 336
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top