Search

Hello,

Is it possible to use XSL FO with our beloved Symphony to ouptut pdf files? The pdfs would be used by a printer to print business cards for our employees.

I did not take time to test it myself but if anyone has any experience regarding xsl fo and symphony I would be glad to hear it!

Thank you,

You will need an FO processor like Apache FOP. The latter must be installed on the server, so you probably can't do it on a shared host.

Generating the XSL-FO document should be rather straightforward — it's just a special XML-type "page" for Symphony. Since Apache FOP is a command line tool, you will then use PHP's exec() function to send your output to FOP and make it write the PDF file.

I will do the exact same thing in a current project. I already have a proof of concept, and the resulting PDF files are rather cool — including SVG logos, images and embedded font subsets.

Michael, this makes me want to wet myself. Would you do a write up for the tutorials section when it's working properly?

Way cool, it would mean URL to PDF and the horrible library behind it can sod off :D

Yeah, sure I can do a write-up when the project is finished. Since I am writing a very detailed documentation anyway, that shouldn't be too hard.

@brendo: Yes, if you have root access to your machine, I think that XSL-FO and FOP really is the way to go. On shared hosting however those PHP PDF libraries may be the only solution...

(I am very glad that I am working on virtual servers with root access at the moment. There are a many more interesting aspects/solutions in my current project!)

Nice, you're right it doesn't sound too complicated. The FOP module shouldn't be a problem. If ever you have the time, I would love a tutorial on it though!

Good luck with your project!

Thanks!

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