Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

export from html to pdf

Posted on 2008-06-25
12
Medium Priority
?
987 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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

604 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