I´m looking for a solution to generate pdf documents online. I can use
CGI scripts or php programs on my server. The server I use is not a
windows but a unix style server. So software based on the windows
world is not an option.
What I want to do is: I generate a HTML page from a perl script and
want to have an option to send this page to a PDF generator that will
convert it to PDF format.
The software must be independed of any special modules that could be
available on servers as I don not run the server myself. My provider
will not support the installation of special modules on the server.
Any ideas ? |
Request for Question Clarification by
palitoy-ga
on
23 Aug 2004 04:17 PDT
Hello Till
Have you tried FPDF?
"FPDF is a PHP class which allows to generate PDF files with pure PHP,
that is to say without using the PDFlib library. The advantage is that
PDFlib requires a fee for a commercial usage. F from FPDF stands for
Free: you may use it for any kind of usage and modify it to suit your
needs.
FPDF has other advantages: high level functions. Here is a list of its
main features:
· Choice of measure unit, page format and margins
· Page header and footer management
· Automatic page break
· Automatic line break and text justification
· Image support (JPEG and PNG)
· Colors
· Links
· TrueType, Type1 and encoding support
· Page compression"
http://www.fpdf.org/
Let me know if this solution fits your needs and I can post it as an
official answer.
|
Clarification of Question by
till-ga
on
23 Aug 2004 05:02 PDT
How do I send a HTML page to this program ? As stated in my question
I´m looking for a software that creates a pdf when you send a HTML
page as a parameter.
FAQ of FPDF:
"19. Can I convert an HTML page to PDF with FPDF?
No. But a GPL C utility does exist, htmldoc, which allows to do it and
gives good results:"
So this one is not an option for me.
till-ga
|
Request for Question Clarification by
eiffel-ga
on
24 Aug 2004 02:51 PDT
Hi Till,
It's not quite clear to me what your constraints are. Would this be an
acceptable solution:
1. A command-line software application that converts an HTML file
(either stored, or from standard input) to a PDF file (on standard
output).
2. The above application is supplied as source code written in C - but
it is a complete application not a programmer's library. The
application is free and is written to be compiled with cc or gcc on
Unix or Linux.
3. You compile the application (preferably on your provider's server,
but otherwise on a compatible machine).
4. You copy the resulting executable to your provider's server and
call it from a short PHP script (that basically writes an
"application/pdf" header to standard output then calls the HTML-to-PDF
conversion utility in "passthru" mode to put the PDF on standard
output to be served by the webserver.
This solution does not require your provider to install any special
module onto their webserver, but it does require that you can run your
own executable on the server (called from a PHP script).
Regards,
Roger
|
Clarification of Question by
till-ga
on
24 Aug 2004 03:27 PDT
Hi eiffel-ga and thanks for your efforts. But I can´t compile any
programs on this server as I do not have a telnet access.
Seems my question is much more complicated than expected.
till
|
Request for Question Clarification by
andyt-ga
on
27 Aug 2004 19:22 PDT
Hello,
I found html2pdf-- http://sourceforge.net/projects/html2fpdf which I
think solves your problem. It's based off of fpdf, so I dont think
you'll need any modules installed. If this answered your question,
let me know and I'll post it as an answer.
-Andyt-ga
|
Clarification of Question by
till-ga
on
30 Aug 2004 11:10 PDT
Hello andyt-ga,
although there are still some problems (errors when wirting out pdf
datas) I will accept you good research work as an answer.
till-ga
|