Waspman
Posts: 948
|
| Posted: 03/15/2011, 9:14 AM |
|
Been using TCPDF but I wanted more style that was easy to setup. Just installed dompdf and it was really easy.
Uploaded files and used the following script in BeforeOutput event:
global $main_block;
$save_block = $main_block;
require_once("./dompdf/dompdf_config.inc.php");
$html = $save_block;
$dompdf = new DOMPDF();
$dompdf->load_html($html);
$dompdf->render();
$dompdf->stream("sample.pdf");
Whatever is on the page is in the pdf....any style I like...Brill:)
_________________
http://www.waspmedia.co.uk |
 |
 |
datadoit
|
| Posted: 03/15/2011, 9:55 AM |
|
Why not just:
global $main_block;
require_once("./dompdf/dompdf_config.inc.php");
$dompdf = new DOMPDF();
$dompdf->load_html($main_block);
$dompdf->render();
$dompdf->stream("sample.pdf");
Is there a reason for loading the main block into two different variables?
|
|
|
 |
Waspman
Posts: 948
|
| Posted: 03/15/2011, 11:12 AM |
|
Nope DD, just got carried away with how quick it was
Thanks
_________________
http://www.waspmedia.co.uk |
 |
 |
jjrjr2
Posts: 131
|
| Posted: 03/15/2011, 9:10 PM |
|
Yup
DomPDF is great
It is what I used for my CCS Plugin here...
http://ccselite.com/online_store.php?pid=24
This plugin also supports HTMLDOC. & the PHP Library PDFLib. Also works on both linux & Windows servers..
Let me know if U want some mods & fixes I created in dompdf for my plugin.. Most notably I added a patch to resolve the security hole.
John
_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com
Real Web Development At: http://RealWebDevelopment.us |
 |
 |
jjrjr2
Posts: 131
|
| Posted: 03/15/2011, 9:13 PM |
|
Hmm..
Just looked at the DOMPDF site.
Are there finally new versions???
The DOMPDF I implemented in CCSPDF 2.4 is about 4 years old. I recently looked for an update and there was none.
Thw version I used did not implement classes.
Suppose it's time for me to re-look at this.. LOL
Thanks Waspman..
John
_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com
Real Web Development At: http://RealWebDevelopment.us |
 |
 |
Waspman
Posts: 948
|
| Posted: 03/16/2011, 12:35 AM |
|
Hi John
I did try your implementation, but it didn't work. That's why I used tcpdf. I didn't think to try dompdf cos of my experience with what you've done.
Google says the security risk is the dompdf.php file and I just removed it and everything works fine?
_________________
http://www.waspmedia.co.uk |
 |
 |
jjrjr2
Posts: 131
|
| Posted: 03/16/2011, 6:38 AM |
|
Hi Waspman.
I remember that..
I still wonder what the issue was. U never did get CCSPdf implemented...
Guess we never explored it to much cause it is generally easy to implement..
LOL TCPDF I looked at that and it looked much more difficult to integrate than domPDF LOL
Anyway. If U got time I would be interested in what the issue was with CCSPdf...
BTW did that logout on browser close work for U??
John
_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com
Real Web Development At: http://RealWebDevelopment.us |
 |
 |
Waspman
Posts: 948
|
| Posted: 03/16/2011, 8:12 AM |
|
Hi John
The problem was probably me...I'm a bit thick as you can see from above:)
With regard to the logout, no I never got to the bottom of it
Tony
_________________
http://www.waspmedia.co.uk |
 |
 |
jjrjr2
Posts: 131
|
| Posted: 03/16/2011, 10:05 PM |
|
I did post a solution for that browser close logout problem
Take a look at that thread & let me know it that works for U..
John
_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com
Real Web Development At: http://RealWebDevelopment.us |
 |
 |