Search

I want to email the result of a questionary (a front-end entry in symphony) to myself and the visitor who filled it out, as a pdf.
The most simple approach would be to create a resulting page (xhtml and css, far more easy then pushing content and layout data directly into a phptopdf class) and use the dompdf html to pdf converter, also since it doesnt have any special server requirements.
After it generates the pdf, I am stuck:

How to add this pdf as an attachment in the email sent by the filter email template ?

I guess I should hack this extention to add a filetype and to fopen and fread teh generated pdf… But the actual email magic seems to happen in /symphony/lib/toolkit/events/event.section.php and not in the event, so i should hack the symphony core?….or can use my own email magic from an extension. I wonder why the email functionality hasn’t been extracted as an extension? edit: bc of lost paswords and other core feats need email, you can just put your custom email classes in events

Maybe I am better off just trying to use gmail smtp instead of the build in mailer? Would it have more or less chance of being flagged as spam?

edit: this tutorial sums it all up, uses swiftmail and dompdf

Has anybody ever used dompdf to “simply” generate PDF downloads of the current front-end page? I’m building an university calendar that should be downloadable and this sounds promising.

I’ve just did. It looks horrible. :-)

Its on my 2do list, I never got to it. Michael-e has sent me some code to fire it on the event, when a form is submitted.

@phoque

what are you pdfing? simple text and lines shoudl be OK no? is it so ugly?

I spotted wkhtmltopdf today — a command line tool to render a page with Webkit and convert to PDF (hence it should have CSS support etc.) Might be worth a shot?

what are you pdfing? simple text and lines shoudl be OK no? is it so ugly?

A XHTML page with CSS. Although there is support for CSS it is broken quite badly.

I spotted wkhtmltopdf today

I saw that one too… Unfortunately though my environment doesn’t support it (shared host).

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details