Search
Other Sourcerer questions
Forum

Generate PDF output

Thom Hounsell's Avatar Thom Hounsell
I've tried a number of experiments trying to use sourcerer to generate a pdf output. I've tried writing a script that works fine locally with FPFD, including the script file in an article. It doesn't generate any errors, but the resulting file is blank. I also tried using PHOCA PDF plug in with a script that echoes output to the article text. PHOCA outputs a readable pdf, but all the echoed content is missing. Anyone know the path to success?
Peter van Westen's Avatar Peter van Westen ADMIN
The PHP code you execute with Sourcerer is done inside the rendering of a Joomla HTML page.
This is different than executing code in a stand-alone file.
So you might need to take extra steps to make it possible for that code to generate and output a pdf file, if at all possible.

I recommend you use a component that is made for outputting PDFs, like Phoca.
Please post a rating at the Joomla! Extensions Directory
Thom Hounsell's Avatar Thom Hounsell
Thanks. I tried PHOCA too and it only renders the hard text in the article, not any text generated via scripts. So it looks like I'm outta luck. I wish Jumi was still a thing because the next option seems to be to just build a php file outside of joomla.
Peter van Westen's Avatar Peter van Westen ADMIN
Jumi would have the same result Sourcerer has.
Please post a rating at the Joomla! Extensions Directory
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription