Solved

export from html to pdf

Posted on 2008-06-25
12
981 Views
Last Modified: 2010-05-18
is it possible to stream html-output to pdf (including images, tables, ...)?
I have tried fpdf but it cannot stream html to pdf. It has own syntax.
I cannot install perl or ghostscript.
I wanted to use dompdf, but i've heard it has leaks and conflicts with domxml.

Can anyone help me?
0
Comment
Question by:worxsteven
  • 5
  • 5
  • 2
12 Comments
 
LVL 48

Expert Comment

by:hernst42
Comment Utility
If you can't install an external program like htmldoc it is not possible via php.

Also never heard of a class which support rendering html to pdf and works with images, ...
0
 

Author Comment

by:worxsteven
Comment Utility
ok, so what do you suggest as the easiest and best solution to render html to pdf? (on linux)
0
 
LVL 48

Expert Comment

by:hernst42
Comment Utility
install htmldoc and let html do create the pdf via exec
http://www.htmldoc.org/
0
 
LVL 17

Expert Comment

by:nplib
Comment Utility
0
 
LVL 17

Expert Comment

by:nplib
Comment Utility
fdpf allows you to make pdfs using php and html
more so html inside php.
0
 

Author Comment

by:worxsteven
Comment Utility
so if i add a background to the html, tables, font sizes + colors, ... the fpdf can convert this to pdf with some single commands? What do i have to do to create this: http://www.worx.be/test.html
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 17

Expert Comment

by:nplib
Comment Utility
That you will have to download the class first, I've never used it personally, I know of a lot of people who have used it, and I have participated in a lot of discussions on the subject.

After you download the file, and check out the doc, I can help you after that,
0
 

Author Comment

by:worxsteven
Comment Utility
what class?
0
 
LVL 17

Expert Comment

by:nplib
Comment Utility
the fpdf class from http://www.fpdf.org/
0
 

Author Comment

by:worxsteven
Comment Utility
i already knew that, but it can't just convert html (tables, backgrounds, fonts, ...) into pdf. You need to use the fpdf-syntax right? Isn't there another way?
0
 
LVL 17

Expert Comment

by:nplib
Comment Utility
well No,

but if you look at the tutorial, you will see how they converted html into "fpdf syntax".

if your html is static code, you can always use file_get_contents() function to place your html into a working variable.
http://www.php.net/manual/en/function.file-get-contents.php
0
 

Accepted Solution

by:
worxsteven earned 0 total points
Comment Utility
i managed to use dompdf, so problem solved.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now