New PDF option

Status
Not open for further replies.
Now if you could come up with a way of reading Excel xlsx files into MySQL I'd be ecstatic. (JUST KIDDING!:p)
 
with Joomla 2.5.4 / 2.5.6 no problems...



except if you have non English characters you get question marks (?) in output pdf file.
 
Now if you could come up with a way of reading Excel xlsx files into MySQL I'd be ecstatic. (JUST KIDDING!:p)
There's an Excel option in CSV import...

For more discussion it's better to open a new thread.
 
Jaanus - I can't replicate any of those errors, using the J! templates you mentioned, with either lists or forms, using a variety of Fabrik templates.

Can you try completely deleting the ./libraries/dompdf folder, and re-uploading it from a github ZIP?

-- hugh
 
Jaanus - I can't replicate any of those errors, using the J! templates you mentioned, with either lists or forms, using a variety of Fabrik templates.

Can you try completely deleting the ./libraries/dompdf folder, and re-uploading it from a github ZIP?

-- hugh

Will test soon this way.
TESTED. Nothing changed. Look for example:
http://j25.nurmoja.net.ee/sundmuste-listi-kalendrivaade

But could it be somehow depending of php version? My host has 5.2.17
Or something is missing / is too much?
 
Nah, it's a DOMPDF bug. I've reported it.

Just not sure why your list thinks it needs a frame decoration at the page level rather than the block level. The method it is bitching about exists in the block decoration class, but not in the page decoration class.

-- hugh
 
Confused. I give up :S No ideas why pdf works for one list and not for others.

http://j25.nurmoja.net.ee
Menu
PDF TEST FABRIK

PDF with joined data - doesn't work
PDF test joined table - doesn't work
Testing birthday - working

The only differences are that
- the db tables for the first two lists were created by Fabrik (with creation of these lists)
- the third list was created on existing db table and it is much bigger than other 2

I thought earlier that maybe the pdf dislike table join, but as I see it doesn't affect
 
It's crashing on my site if the list doesn't fit on one page (joined list is working), e.g. ok if 10 rows displayed, trying to create PDF if 25 rows are displayed gives

Fatal error: Uncaught exception 'DOMPDF_Exception' with message 'Frame not found in cellmap' in C:\xampp\htdocs\j17fabrik\libraries\dompdf\include\cellmap.cls.php:212 Stack trace: #0 C:\xampp\htdocs\j17fabrik\libraries\dompdf\include\table_cell_renderer.cls.php(51): Cellmap->get_spanned_cells(Object(Table_Cell_Frame_Decorator)) #1 C:\xampp\htdocs\j17fabrik\libraries\dompdf\include\renderer.cls.php(283): Table_Cell_Renderer->render(Object(Table_Cell_Frame_Decorator)) #2 C:\xampp\htdocs\j17fabrik\libraries\dompdf\include\renderer.cls.php(117): Renderer->_render_frame('table-cell', Object(Table_Cell_Frame_Decorator)) #3 C:\xampp\htdocs\j17fabrik\libraries\dompdf\include\renderer.cls.php(185): Renderer->render(Object(Table_Cell_Frame_Decorator), false) #4 C:\xampp\htdocs\j17fabrik\libraries\dompdf\include\renderer.cls.php(185): Renderer->render(Object(Table_Row_Frame_Decorator), false) #5 C:\xampp\htdocs\j17fabrik\libraries\dompdf\include\renderer.cls.php(185): Renderer->render(Object(Table_Row_Group_Frame_Decorator), false) in C:\xampp\htdocs\j17fabrik\libraries\dompdf\include\cellmap.cls.php on line 212
 
Nah, it's a DOMPDF bug. I've reported it.

Just not sure why your list thinks it needs a frame decoration at the page level rather than the block level. The method it is bitching about exists in the block decoration class, but not in the page decoration class.

-- hugh

Your report there helped me to find at least temporary solution :)

I just copied two functions from block_frame_decorator.php to the end of page_frame_decorator.php where they were missing and just left them empty:

function add_line($br = false) {
}

function get_current_line_box() {
}

Additional info: pdf works also for details view, the form admin just needs to be resaved.

Suggestion: instead just 'PDF' the tip should say something like 'Download as pdf file' - just to be sure that we should not wait for an inline or popup pdf but a file downloaded to our computer.
 
Trying to sort out what I got so fare

PDF in form:
PDF doesn't display a sort of "screenshot" of your form but the content of the stored record (calling ...index.php?option=com_fabrik&view=details&format=pdf&formid=11&Itemid=265&lang=de&rowid=X);
so if you modify your record and click PDF it will print the old stored values or - if it's a new record - the empty record (with default values).

If this is the intended behaviour it doesn't make sense to have the PDF button in a form view, it should be only in details view.

Configuration of dompdf:
In ...\libraries\dompdf\dompdf_config.custom.inc.php I can set PAPER_SIZE to A4 but it seems to be ignored (even if I set it directly in dompdf_config.inc.php)
I didn't find a "landscape" option.
I think it should be possible to set those options in fabrik options or (better) in list/form definition

...libraries\dompdf\lib\fonts\log.htm should be somewhere else (e.g. .../logs) and/or included in .gitignore

@Jaanus:
I've added your fix but it doesn't help against the "list exceeding one page" crash.
 
In ...\libraries\dompdf\dompdf_config.custom.inc.php I can set PAPER_SIZE to A4 but it seems to be ignored (even if I set it directly in dompdf_config.inc.php)
I didn't find a "landscape" option.
I think it should be possible to set those options in fabrik options or (better) in list/form definition

The best would be in both. Fabrik options as global that list and form settings would keep global or override
 
I don't have time to address these today, but keep 'em coming. Rob and I are both monitoring this thread, and will work on issues and ideas as time allows.

Jaanus - your pull request has been merged.

-- hugh
 
I'll talk to Rob about their suggestion of using getHTML(), or whatever it was, so we can produce a debug report for them, that shows exactly what HTML we are asking dompdf to process.

I get the feeling we may need this, as any issues with dompdf we run in to, the first question their support will ask, quite reasonably, is "can we see the exact HTML you are trying to render?". So it'd probably be worth adding a debug switch to the PDF rendering, so instead of rendering the PDF, it just tosses out the exact HTML we asked to be rendered, as a text file.

-- hugh
 
@Jaanus:
I've added your fix but it doesn't help against the "list exceeding one page" crash.

Yes, I can also confirm such error:
Fatal error: Uncaught exception 'DOMPDF_Exception' with message 'Frame not found in cellmap' in /home/...../libraries/dompdf/include/cellmap.cls.php:212 Stack trace: #0 /home/...../libraries/dompdf/include/table_cell_renderer.cls.php(51): Cellmap->get_spanned_cells(Object(Table_Cell_Frame_Decorator)) #1 /home/...../libraries/dompdf/include/renderer.cls.php(283): Table_Cell_Renderer->render(Object(Table_Cell_Frame_Decorator)) #2 /home/...../libraries/dompdf/include/renderer.cls.php(117): Renderer->_render_frame('table-cell', Object(Table_Cell_Frame_Decorator)) #3 /home/...../libraries/dompdf/include/renderer.cls.php(185): Renderer->render(Object(Table_Cell_Frame_Decorator), false) #4 /home/...../libraries/dompdf/include/renderer.cls.php(185): Renderer->render(Object(Table_Row_Frame in /home/...../libraries/dompdf/include/cellmap.cls.php on line 212

It doesn't occur in details view when it exceeds one page.
 
i've added a global config setting in the 'debugging' pane, to enable the output of the pdf html. So if someone can trigger the error and report in the dompdf thread that would be great
thx
Rob
 
list PDF with debug on: resulting page

is ignoring the selected PDF template
is displaying parts of the Joomla page
doesn't display German umlauts correctly

this is ok if adding
&layout=xxx&tmpl=component
to the URL

List PDF as PDF:
ignoring the template but characters are ok
crash if list exceeds one "paper" page (e.g. 25 rows)
white screen (timeout?) with 15 rows
nice PDF with 10 rows (but default template, not the selected one)
 
Just updated. PDF files are not generated now, After clicking on pdf button I just see the html page with edit/details buttons removed. Or is it temporary, testing phase?

EDIT: haven't notiiced the pdf debug option. Just had to resave the Fabrik config form
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top