saseow
Posts: 744
|
Posted: 04/20/2013, 4:44 AM |
|
I have tried implementing the dompdf library using this code:
global $main_block;
require_once("./dompdf/dompdf_config.inc.php");
$dompdf = new DOMPDF();
$dompdf->load_html($main_block);
$dompdf->render();
$dompdf->stream("sample.pdf");
I keep getting this error:
Fatal error: Uncaught exception 'DOMPDF_Exception' with message 'Frame not found in cellmap' in C:\php webs\ns_ultrasound\dompdf\include\cellmap.cls.php:212 Stack trace: #0 C:\php webs\ns_ultrasound\dompdf\include\table_cell_renderer.cls.php(51): Cellmap->get_spanned_cells(Object(Table_Cell_Frame_Decorator)) #1 C:\php webs\ns_ultrasound\dompdf\include\renderer.cls.php(283): Table_Cell_Renderer->render(Object(Table_Cell_Frame_Decorator)) #2 C:\php webs\ns_ultrasound\dompdf\include\renderer.cls.php(117): Renderer->_render_frame('table-cell', Object(Table_Cell_Frame_Decorator)) #3 C:\php webs\ns_ultrasound\dompdf\include\renderer.cls.php(185): Renderer->render(Object(Table_Cell_Frame_Decorator), false) #4 C:\php webs\ns_ultrasound\dompdf\include\renderer.cls.php(185): Renderer->render(Object(Table_Row_Frame_Decorator), false) #5 C:\php webs\ns_ultrasound\dompdf\include\renderer.cls.php(185): Renderer->render(Object(Table_Row_Group_Frame_Decorator), false) #6 C:\php webs\ns_ultrasound\dompdf\include\renderer.cls.php(185): Ren in C:\php webs\ns_ultrasound\dompdf\include\cellmap.cls.php on line 212
|
|
|
MichaelMcDonald
Posts: 640
|
Posted: 05/08/2013, 7:41 AM |
|
Check this out:
http://ccs elite.com/online_store.php
(remove the space between ccs and elite...
CCSPdf Ver. 2.4
_________________
Central Coast, NSW, Australia.
|
|
|
saseow
Posts: 744
|
Posted: 05/08/2013, 8:03 AM |
|
Hi Michael,
I have had a look at that but the reviews did not impress me much. I contacted 'you know who' a few times but never got a reply. I really do not want to spend the money on something that does not work. I would like someone to test it out on the page in question and see if it does the job before I buy it.
Anyway, that's where I stand right now. You into super XV rugby?
|
|
|
DataDoIT
|
Posted: 05/08/2013, 12:30 PM |
|
$main_block is nothing more than straight HTML rendered by CodeCharge.
I would suggest just throwing your own HTML at DOMPDF to see if it sticks.
Ex:
$My_HTML = "<html><head></head><body><table><tr><td>Hello
World!</td></tr></table></body></html>";
require_once("./dompdf/dompdf_config.inc.php");
$dompdf = new DOMPDF();
$dompdf->load_html($My_HTML);
$dompdf->render();
$dompdf->stream("sample.pdf");
|
|
|
MichaelMcDonald
Posts: 640
|
Posted: 05/08/2013, 10:59 PM |
|
Saseow,
Can be a little bit fiddly to get running when on apache with virtual servers because of server file paths. Other than that It works well, I have a copy. the dvelopers product is a variant of DOMPDF with extra coding to plug a known security exploit, and he worked in stealth in US air force.
Rgds,
Michael.
_________________
Central Coast, NSW, Australia.
|
|
|
MichaelMcDonald
Posts: 640
|
Posted: 05/09/2013, 12:48 AM |
|
The rugby union not so much - more into the rugby league and AFL
_________________
Central Coast, NSW, Australia.
|
|
|
saseow
Posts: 744
|
Posted: 05/09/2013, 1:02 AM |
|
I am going to do a bit more research on this.
Thank you for all the tips etc.
|
|
|
bannedone
Posts: 273
|
Posted: 05/09/2013, 1:21 PM |
|
Hi Saseow
This is "You Know Who".. LOL
Sorry if I have not replied to you. I do not recall any messages from you.. My Bad!!
I have been ill off and on for quite a while and some things fell thru the cracks.
If you need some assistance... Let me know
John
_________________
John Real
CodeCharge Studio Support, Training, Consulting, Development, Web based solutions
http://realsites.biz
http://ccselite.com
Other Banned IDs on this Forum. jjrjr1, jjrjr2 |
|
|
saseow
Posts: 744
|
Posted: 05/09/2013, 1:26 PM |
|
Hello John,
I do hope that you are feeling better.
I have not solved the problem as yet but perhaps you can help.
I will contact you via your site in a day or so to see if we can come up with something.
Thank you for the reply!
Regards,
Trevor
|
|
|
MichaelMcDonald
Posts: 640
|
Posted: 05/10/2013, 2:43 AM |
|
You know who !
He whose name shall not be spoken !!!
The artist formerly known as !!!!
_________________
Central Coast, NSW, Australia.
|
|
|
saseow
Posts: 744
|
Posted: 05/26/2013, 4:08 AM |
|
Well, I bought it and now I've tried it but I keep getting nothing. The page simply sits there like a wet rag.
It is writing the complete file to the tmp folder (minus grid lines at the moment) and that is it.
Running on Windows 8 and xampp.
John, I have sent you an email regarding this but perhaps someone else has an idea as well.
|
|
|
MichaelMcDonald
Posts: 640
|
Posted: 05/26/2013, 11:57 PM |
|
Are the .dll's copied in to windows system and paths set? (I haven't done paths in Windows 8)...
_________________
Central Coast, NSW, Australia.
|
|
|
saseow
Posts: 744
|
Posted: 05/27/2013, 2:07 AM |
|
Thanks for the reply Michael.
I have stopped trying with that and I bought the 'you know who' convertor. So far I have not got that to work either.
|
|
|
MichaelMcDonald
Posts: 640
|
Posted: 05/27/2013, 7:08 AM |
|
Isn't there a .dll that has to be copied in somewhere for the windows version ? been a while since i played with the windows version...so will have to dig out some old docco to be more specific.....
that's what i meant about the .dll... and then have a look at environment/paths settings...in windows
_________________
Central Coast, NSW, Australia.
|
|
|
saseow
Posts: 744
|
Posted: 06/04/2013, 2:25 PM |
|
OK, Everything is working now..Some different tweaking needed for Windows 8 compared with Linux boxes.
Glad that is over with.
|
|
|
MichaelMcDonald
Posts: 640
|
Posted: 06/04/2013, 8:12 PM |
|
Good to hear.
What did you do to get it running under Windows 8?
_________________
Central Coast, NSW, Australia.
|
|
|
saseow
Posts: 744
|
Posted: 06/04/2013, 11:53 PM |
|
I guess the same as any other windows ver.
Set the environment variable path and included the DLLs in the php.ini file.
It does not produce anything that looks like it is supposed to so there is lots of inline css to code to get it looking correct but at least it works.
|
|
|
MichaelMcDonald
Posts: 640
|
Posted: 06/05/2013, 1:13 AM |
|
There are limitations to css support with dompdf.
I played with a basic CCS style and set the font size about 4 pixels from memory (maybe 7) to make the html work visibly.
_________________
Central Coast, NSW, Australia.
|
|
|
saseow
Posts: 744
|
Posted: 06/05/2013, 3:29 AM |
|
Yes, so I have noticed.
I am using 'You know Who's' system and I have to create all css as inline css. A real hassle but at least it produces a PDF without having to go through the Windows 'Print' routine.
|
|
|