?
Solved

export from html to pdf

Posted on 2008-06-25
12
Medium Priority
?
986 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
  • 2
12 Comments
 
LVL 48

Expert Comment

by:hernst42
ID: 21867655
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
ID: 21867932
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
ID: 21868235
install htmldoc and let html do create the pdf via exec
http://www.htmldoc.org/
0
Video: Liquid Web Managed WordPress Comparisons

If you run run a WordPress, you understand the potential headaches you may face when updating your plugins and themes. Do you choose to update on the fly and risk taking down your site; or do you set up a staging, keep it in sync with your live site and use that to test updates?

 
LVL 17

Expert Comment

by:nplib
ID: 21868242
0
 
LVL 17

Expert Comment

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

Author Comment

by:worxsteven
ID: 21871952
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
 
LVL 17

Expert Comment

by:nplib
ID: 21877257
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
ID: 21878588
what class?
0
 
LVL 17

Expert Comment

by:nplib
ID: 21878601
the fpdf class from http://www.fpdf.org/
0
 

Author Comment

by:worxsteven
ID: 21879115
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
ID: 21883487
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
ID: 21896907
i managed to use dompdf, so problem solved.
0

Featured Post

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

765 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