CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 DOMPDF Creation in CSS

Print topic Send  topic

Author Message
Zye

Posts: 56
Posted: 10/09/2008, 10:23 AM

Hello John

In connection with your post Easy PDF Creation in CSS (now locked) found at:
http://forums.yessoftware.com/posts.php?post_id=93514

I am having another go at getting your code for DOMPDF to work on my server.
DOM is installed. I have done the modifications to the dompdf.php file. My temp folders and the fonts folder have write permissions.
The temporary HTML is being created when I uncomment your second echo and it shows the temporary pdf filename.
Your third echo after exec($command) gives me the result below but no PDF creation:

Notice: Undefined variable: PDFfilename in /var/www/vhosts/xxxxxx/httpdocs/brochure2_events.php on line 118

temp/pdf5ppeghk17mhtcpg80g7ucngo50664880.pdf
php -f dompdf/dompdf.php -- -f tmp/pdf5ppeghk17mhtcpg80g7ucngo50664880.pdf -b ./ -s /var/www/vhosts/xxxxxx/httpdocs/brochure2.php tmp/pdf5ppeghk17mhtcpg80g7ucngo50664880.html

When I run passthru and die() I get a blank page, no errors. I haven't got access to the server logs at the moment.
All in all I am just getting my HTML.
Can you see where I may be going wrong :-/

Thanks again

Cheers

Zye ...
View profile  Send private message
Zye

Posts: 56
Posted: 10/09/2008, 2:05 PM

Hi

I am going to use the class method instead, in event beforeshow. Works quite well.

  
require_once("dompdf_config.inc.php");  
$html =  
    '<html><body>'.  
    '<p>Some text</p>'.  
    '</body></html>';  
  
$dompdf = new DOMPDF();  
$dompdf->load_html($html);  
  
$dompdf->render();  
$dompdf->stream("my_pdf.pdf", array("Attachment" => 0));  


For embedding the images I use this, from the forum - works fine.

' . $_SERVER['DOCUMENT_ROOT'] . '/images/

Happy coding ... :-|
Zye ...
View profile  Send private message
jjrjr1


Posts: 942
Posted: 10/10/2008, 8:33 AM

Hi Zye

Glad you found a solution.

Did you get my note from ccselite.com ?

This could be good info you ight want to post there also.

Incidentally, here is some CCS code that will do exactly what you want.

http://ccselite.com/online_store.php?pid=24


Thanks


_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.