CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 CSS page to PDF

Print topic Send  topic

Author Message
Seichobob

Posts: 55
Posted: 06/17/2008, 7:33 AM

hi forum,

i use css 4 with php and mysql and even if i am a beginner, i love it. now i need to create pdf files automatically from a normal html file. since 2 days i tried everything but nothing works for me... the task is very simple: i want to create a pdf file directly from the result html file (eg a grid) and i want to have exactly what i see in html.

i tried superpdf, html2pdf, fpdf, dompdf...

maybe i am to stupid or maybe nothing is exactly what i need...

easy example: ive got a css file called "myfile". theres a grid and a link to crate a pdf. the link should give parameters like &pdf_name=huhu&pdf_folder=/testfolder and so on. the link goes to the next site, "pdf_creator". now i would like to have the same grid on this file but with a redirect i want to get back to my "myfile". the pdf should be created in the backgroud with exactly what i see in my html.

i tried printers like superpdf with ghostscript but there is no possibility to set the page dimensions, i tried php scripts like fpdf eg but i didnt find a possibility to create "wysiwyg" my html file.

can anyone help me with a solution? a good advice? the right tool or script?

sorry for my bad explenation, my bad skills and my bad englisch :-)

greetings from switzerland, mirko
View profile  Send private message
datadoit
Posted: 06/17/2008, 7:44 AM

To clarify, have you tried YesSoftware's SuperPDF product? If so, have
you contacted their support for assistance? http://support.yessoftware.com
Seichobob

Posts: 55
Posted: 06/17/2008, 7:51 AM

yes, i did. superpdf works so far but i have the problem that i am not able to do page size settings, borders eg. page x of y and the url at the bottom are also thing i dont want to have on my pdf. i contacted the ccs support but the answer was that there is no possibility to do such settings... so i cant use superpdf...
View profile  Send private message
jerryvernon

Posts: 35
Posted: 06/17/2008, 12:47 PM

Sorry this not a wysiwyg, I tried so many of those without success.

I use http://www.ros.co.nz/pdf/ a PHP class which will allow the easy production of simple pdf documents.

An example use at http://www.blueskydalyan.com/ and selecting one of the proporties shows an pdf generated on the fly.
View profile  Send private message
jjrjr1


Posts: 942
Posted: 06/17/2008, 1:27 PM

Hi

Yes I have gotten dompdf to work in CCS on linux servers with php.

Take a look at my post

http://forums.yessoftware.com/posts.php?post_id=93514

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

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


Let me know if that helps or if you have any questions.

I believe SuperPDF will only work on local windows machines or on windows servers.

Anyway, let me know.

Have fun

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

Posts: 55
Posted: 06/17/2008, 11:06 PM

jjrjr1: i read ypour post at least three times, i triedjerryvernons php script and i tried dompdf. without access...

can you kindly send me an ccs example how u managed it? this would be a great assistance for me...

for your information: i am working with windows, superpdf would be ok because its prints a pdf out of exactly that what i see in html BUT there are no options, as i wrote, to set the borders eg...

i swear, i tried damn everything, every script i found. dompdf was one of the best (it might be, i only can guess). plese send me an example...

thanks very much, mirko

my mail:seichobob@bluewin.ch
View profile  Send private message
jjrjr1


Posts: 942
Posted: 06/18/2008, 8:53 AM

Hi Mirko

You are hosting at a linux server?

Dompdf is a php script and It will only work on a linux/unix server as far as I know.

The post I pointed you to is the exact ccs code I put into the before output event. Put that code into a before output event and be sure you are passing a value in the _convert parameter.

You also have to make the changes to dompdf I outlined in order for dompdf to run in cgi mode.

This is a server side solution as the conversion occurs at the server.

Does that help?

Let me know

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

Posts: 55
Posted: 06/18/2008, 10:25 PM

hey, thanks for your help. i use windows and i got dompdf to work, but in a completely different way. ive had a little help from a php pro and we made it, it works now.

thanks for your advice...
View profile  Send private message
jjrjr1


Posts: 942
Posted: 06/19/2008, 3:21 AM

Hi

That is great. I never tried to get it running under windows.

On my local server I am running windows with xampp. Can you share with me how you got dompdf to run under windows.

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
Seichobob

Posts: 55
Posted: 06/19/2008, 3:27 AM

i also use xampp...i can send you a test project which includes everything but i cant give you support. ive had help myself and in dont understand what my little helper has done :-) but it works...

before you need to update xampp to the newest version (where php includes CLI) and you need to install a tool for windows fonts (ttf2pt1-3.4.4).

send me a mail and i will reply you my testproject.

seichobob@bluewin.ch
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.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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