Solved

export from html to pdf

Posted on 2008-06-25
12
983 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
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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Logic behind "best rated" calculation 11 31
Doing something wrong with this PDO Select Statement... 3 18
Extracting content from meta tag PHP MYHTML DOM 3 20
Ajax and PHP 4 30
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 …
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

856 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