Hello,
Is there any way to get PhocaPHP to render the output of a page created with DirectPHP? it's a pretty simple set of tables I'm generating from an external database so actually generating the PDF shouldn't be a problem, but PhocaPDF currently just outputs the php code on the page instead.
From looking through the forum it seems some customisation might be needed, with either a custom plugin or editing the PhocaPDF code. I just wondered if anyone had already done anything similar & might be able to give me a few pointers.
Thanks.
rendering DirectPHP output
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: rendering DirectPHP output
Hi, which Joomla! version you are running. Since 2.5 Phoca PDF can render plugin output (needs to be enabled in plugin parameters) but of course it is PDF, not HTML, so it is limited.
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 2
- Joined: 01 Dec 2013, 05:29
Re: rendering DirectPHP output
Jan, when I enable the parameter in Phoca PDF "Display Plugin Code" to YES, the page is blank. When parameter is disabled, page show static article text, but not the Jumi PHP output.
I'm using Joomla 2.5. Please help,
Tony
I'm using Joomla 2.5. Please help,
Tony
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: rendering DirectPHP output
Hi, then it means, the plugin outputs some code which cannot be managed by PDF - in such case:
a) you need to disable the plugin for PDF
b) or you can try to enable php error reporting and check what can be wrong (but for this, PHP, server error reporting and TCPDF needs to be checked)
Jan
a) you need to disable the plugin for PDF
b) or you can try to enable php error reporting and check what can be wrong (but for this, PHP, server error reporting and TCPDF needs to be checked)
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 2
- Joined: 01 Dec 2013, 05:29
Re: rendering DirectPHP output
Hi Jan,
What do you mean, "the plugin outputs some code which cannot be managed by PDF"? What do you mean, "a) you need to disable the plugin for PDF"?
I disabled Jumi and installed DirectPHP but with the same results. I am adding a simple echo command (dropped <> so it would show the php code in the forum):
?php
echo 'stuff';
?
The text "stuff" shows up in the article. But when I create the PDF using PhocaPDF, either the article text is created in the PDF without "stuff" or the PDF is blank with only a header and footer, depending whether "Display Plugin Code" is set to Yes or No in "Phoca PDF - Content" plugin.
Has anyone tested Jumi or DirectPHP to generate dynamic content in an article and then tried to create a PDF from the article using PhocaPDF?
Thank you for your help,
Tony
What do you mean, "the plugin outputs some code which cannot be managed by PDF"? What do you mean, "a) you need to disable the plugin for PDF"?
I disabled Jumi and installed DirectPHP but with the same results. I am adding a simple echo command (dropped <> so it would show the php code in the forum):
?php
echo 'stuff';
?
The text "stuff" shows up in the article. But when I create the PDF using PhocaPDF, either the article text is created in the PDF without "stuff" or the PDF is blank with only a header and footer, depending whether "Display Plugin Code" is set to Yes or No in "Phoca PDF - Content" plugin.
Has anyone tested Jumi or DirectPHP to generate dynamic content in an article and then tried to create a PDF from the article using PhocaPDF?
Thank you for your help,
Tony
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: rendering DirectPHP output
Hi, as you can read on Phoca PDF site, PDF is not like HTML (both are different types of document - one for the dynamic screen, second mostly for printing or fixed screen with fixed measurements) ... The basics of html to pdf is a text, PDF can somehow work with some html tags and with some very basic css attributes (PDF is rendered by TCPDF class) - if the PDF gets text, mostly the one problem can be memory - lenght of text - if it gets html - then there can be a lot of problems (while translating html parts to PDF parts) - if it gets HTML and CSS, mostly some really eays formatted text can be transformed.
I don't know what code jumi or directphp produces but if the code is some difficult code (full featured html and css) it can get problems while transforming such code - so the plugin output needs to be tested and if possible the plugin output needs to be simplified ... As written in Phoca PDF documentation - displaying plugin code is an experimental function and if it will work or not, it always depends on the part which produces the output (in this case the plugin produces the output - the easier output the better)
I don't know what code jumi or directphp produces but if the code is some difficult code (full featured html and css) it can get problems while transforming such code - so the plugin output needs to be tested and if possible the plugin output needs to be simplified ... As written in Phoca PDF documentation - displaying plugin code is an experimental function and if it will work or not, it always depends on the part which produces the output (in this case the plugin produces the output - the easier output the better)
If you find Phoca extensions useful, please support the project