Printing/PDF

puntino

Member
I am currently working on a project. Nothing complicated, just 3 or 4 tables, simple forms to enter data and I should be able to p?rint the tables. As there seems to be no way to print a table, I tried to use the new feature of downloading a table as a PDF with the option to print that later on.

I am using Joomla 2.5.6, Fabrik 3.0.6 under Windows 7 Home Premium.
Apache/2.2.21
PHP/5.3.10
MySQL-Client-Version: mysqlnd 5.0.8-dev - 20102224 - $Revision: 321634 $

The out of the box installation reported "Dompdf library not found" and created a long list of errors upon calling PDF. Following the instructions given here: https://github.com/Fabrik/fabrik, I copied the whole content of the "Fabrik-fabrik-3.0.6.1-24-gbc5514b" folder to the joomla installation and did all the recommended installation and enabled all plugins, since I did not find any plugin pointing to PDF or giving some clue towards PDF.

The result is completely disastrous. The error message regarding DOMPDF is gone, alas PDF does not work, but the complete installation is corrupted.There is:

1. no PDF. After a click on the icon, nothing happens, except a short flickering. No error message, nothing
2. after calling the PDF function, the menues are gone

How can I bring PDF to work? If this is not possible, is there any way to print a sensible list at all with a choice to print ALL records, not just the screen content? As good as fabrik is, the lack of a usable way to print a list is inacceptable. The world does not end at the glass of the monitor. . .

Regards
 
same problem after update to 3.0.6.1 from Github, the "pdf" (COM_FABRIK_PDF) option in a global or filtered list view do nothing than move the default template to left for about some pixels. Joomla 2.5.6, JA-Putity II template.

Before last update that key produced a new window with data list in printable pdf page.
 
The new PDF stuff is still very much "work in progress". We'll be gradually improving it as time allows.

-- hugh
 
After having done other things between August (!) and now, hoping things would improve, I must come back to this PDF issue. I now have 2 tables which should be converted into PDF. One table is doing it although the result is far from satisfying. I cannot print all records in a window of say 25 rows as it prints only these 25 rows. However, when I choose "all" in the tables "display" area it reports several times the error:

Warning: Invalid argument supplied for foreach() in /home_pr1/c/o/cosfadmin.ch/htdocs/components/com_fabrik/models/list.php on line 1507

under the bunch of error messages, the table appears and seems to show all records. If I now want to use the PDF function, it reports:

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 20 bytes) in /home_pr1/c/o/cosfadmin.ch/htdocs/libraries/dompdf/include/style.cls.php on line 552

The other table however creates the error message statet at the bottom of this thread without creating the PDF. And yes "Debug PDF" set to NO and the folders libraries/joomla/document/pdf and libraries/dompdf are there.

Did I miss something or is there no way to create a decent report in fabrik? I would accept any form of printout, must not be PDF, although it would be handy. However, not having the possibility to printout a table is not just a missing feature but a core defect and not acceptable. Printout in the browser works, alas does not give satisfying results (records cut at page end etc.) I have now gone through all the threads here and have not found a way to printout or create a PDF that works. I have found however many statements going back to 2011 promising an improve in either printing the table or using PDF. Obviously this is an ongoing simmering problem. Could anybody please statea reliable time horizon when these problems will be resolved?
Export into a CSV file is of no use, since a have images in my files which will not be exported.

Here is the error message mentioned above

Fatal error: Uncaught exception 'DOMPDF_Exception' with message 'Frame not found in cellmap' in /home_pr1/c/o/cosfadmin.ch/htdocs/libraries/dompdf/include/cellmap.cls.php:212 Stack trace: #0 /home_pr1/c/o/cosfadmin.ch/htdocs/libraries/dompdf/include/table_cell_renderer.cls.php(51): Cellmap->get_spanned_cells(Object(Table_Cell_Frame_Decorator)) #1 /home_pr1/c/o/cosfadmin.ch/htdocs/libraries/dompdf/include/renderer.cls.php(283): Table_Cell_Renderer->render(Object(Table_Cell_Frame_Decorator)) #2 /home_pr1/c/o/cosfadmin.ch/htdocs/libraries/dompdf/include/renderer.cls.php(117): Renderer->_render_frame('table-cell', Object(Table_Cell_Frame_Decorator)) #3 /home_pr1/c/o/cosfadmin.ch/htdocs/libraries/dompdf/include/renderer.cls.php(185): Renderer->render(Object(Table_Cell_Frame_Decorator), false) #4 /home_pr1/c/o/cosfadmin.ch/htdocs/libraries/dompdf/include/renderer.cls.php(185): Renderer->render(Object(Table_Row_Frame_Decorator), false) #5 /home_pr1/c/o/cosfadmin.ch/htdocs/libraries/dompdf/include/renderer.cls.php(185): Renderer- in /home_pr1/c/o/cosfadmin.ch/htdocs/libraries/dompdf/include/cellmap.cls.php on line 212
 
the pdf view is limited in the same way that the html view is - we haven't set it up to print out all records.

If you have a lot of data and are trying to load all of it at once on the page as you have seen, you will run into PHP memory issues. You can always try increasing that in your php.ini file or possibly via the htaccess file. A quick google will tell you how to do that.

Did I miss something or is there no way to create a decent report in fabrik? I would accept any form of printout, must not be PDF, although it would be handy.
The standard browser print seems works well for me. You can with css state which parts of your main joomla template you want to include when printing using the @media selectors. I don't see truncation of rows across pages with the default list template, which list template are you using?

The error is a DOM PDF issue which occurs when the table is higher than the page width. I've updated the library to their latest source code (https://github.com/dompdf/dompdf) and committed that to our github repo and I can no longer reproduce the error
 
thx Rob for your reply.

the pdf view is limited in the same way that the html view is - we haven't set it up to print out all records.

If you have a lot of data and are trying to load all of it at once on the page as you have seen, you will run into PHP memory issues. You can always try increasing that in your php.ini file or possibly via the htaccess file. A quick google will tell you how to do that.
This seems to have gone with your library update. However, now the images are not displayed anymore. Instead, the image path is beeing displayed.

The standard browser print seems works well for me. I don't see truncation of rows across pages with the default list template, which list template are you using?
I am using "default". The truncations seem to happen in Chrome only. I have not experienced it with Firefox. The standard browser output is good enough for my internal use. However, I insist that printout does not satisfy more elaborated demand.

You can with css state which parts of your main joomla template you want to include when printing using the @media selectors.
Can you please explain this? I do not understand what you mean.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top