Pdf template for email plugin attachment

Hi,
I found this Thread
http://fabrikar.com/forums/index.php?threads/email-form-plugin-attach-as-pdf.48232/ which sounds to mean that there is a problem with the layout of PDF generated with the email plugin ?

For now, whatever the pdf template I choose ( bootstrap, bootsrap_with tabs or Wellington ) , I have layout on 1 line only ( pdf attached to the post)
I tried to change manually the "wellington" but I don't really see any changes in the output.

Thx !
 

Attachments

  • 26.pdf
    4.2 KB · Views: 27
Wellington shouldn't be there, it was just a test (which is identical to the main bootstrap template) that got included in a realase at some point.

Looking at some PDF issues is on my list for this week.

-- hugh
 
If you do a full github update, there should now be an option in the Fabrik global options for "PDF Library", with a choice of DOMPDF and mpdf. Try using mpdf.

I'm still playing around with finding the best PDF library. Going to try TCPDF next. My experience so far that there isn't a "best" one, rather each one has strengths and weaknesses. For instance, mpdf is great for rendering forms, more reliable with better CSS support than DOMPDF ... but it's a bit sketchy for lists (well, anything with long tables that span more than one page).

-- hugh
 
mm.. don't know how to do a github update, but I will check ! :p
My needs are pretty basic for this form : send by pdf data entered + the signature gathered with the signature plugin ....
Thx !
 
Hi Hugh,
Update done, DomPDF chosen from the options ...
I have a PDF generated but the content needs some formatting I guess
How / where can I configure it ?
for ref, the PDF attached
Other question : I can define the "key" to be able to bypass the ACL when generating the pdf ... where should I fill it on the DomPDF side ? I see salesforce, gmail but nothing for pdf
Thx !
 

Attachments

  • -32.pdf
    1.9 KB · Views: 32
Last edited:
Not sure what you mean : I'm using the email plugin in a form
I have all the field in my email body ( using bootstrap , no article template) and I checked the pdf option, to have same info in the PDF
 
I'm trying to work out why you PDF is in JSON format. Which usually happens if you try and generate a PDF in an AJAX context - like from a form in a content plugin, or in a popup window (if you've "AJAXified" the list links).

-- hugh
 
Unfortunately won't tell me much, as I need to actually get inside the code to debug it. I'll try and replicate it here.

I will however check your setup. Which form is it on?

-- hugh
 
OK, as I said:

I'm trying to work out why you PDF is in JSON format. Which usually happens if you try and generate a PDF in an AJAX context - like from a form in a content plugin,

... and indeed, you are using a form in a content plugin.

Try just using a normal Fabrik menu item link to the form.

Unfortunately, this isn't something I can work round, it's a limitation of the Joomla framework. The email plugin runs during form submission, in the the form "view" context. And to generate a PDF of the form, we have to run a display of it in a form view context. But because, during AJAX submission, the view type is set to "format=raw" (meaning it returns JSON rather than HTML), when we run the display of the form for generating the PDF, that "raw" format overrides the normal "html" format, and you get that JSON view of it.

And because the way J!'s MVC (Model, View, Controller) system works, there's no way for me to set the format back to html, run the PDF view, then set it back to raw. The format is "private" (in the PHP variable sense).

So email PDF attachments can't be generated from form views that submit via AJAX - specifically, from content plugins, or if you have "AJAXified" your list and are submitting the form from a popup.

-- hugh
 
Hi ,
I think I understand the limitation for the PDF with the AJAX.
Thx
the fac to use the content plugin was an attemp when the PDF generation was not working at all.
Define a normal link now and it works !
Thx !
 
Last edited:
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top