| 1 |
lars |
1 |
<html>
|
|
|
2 |
<head>
|
|
|
3 |
<title>html2ps/html2pdf requirements</title>
|
|
|
4 |
<link rel="stylesheet" type="text/css" medial="all" title="Default" href="css/help.css"/>
|
|
|
5 |
</head>
|
|
|
6 |
<body>
|
|
|
7 |
<h1>html2ps/pdf requirements</h1>
|
|
|
8 |
<p><a href="index.html">Back to table of contents</a></p>
|
|
|
9 |
|
|
|
10 |
<h2>Required:</h2>
|
|
|
11 |
<ol>
|
|
|
12 |
<li>PHP 4.1.0 or newer (PHP 5 is supported)</li>
|
|
|
13 |
<li>
|
|
|
14 |
native PHP <a href="http://php.net/manual/en/ref.domxml.php" title="DOM XML documentation and installation instructions">DOM XML</a>
|
|
|
15 |
<em>OR</em>
|
|
|
16 |
<a href="http://www.active-link.com/software/" title="Active-Link DOM XML download page">Active-Link DOM XML</a> extension installed</li>
|
|
|
17 |
|
|
|
18 |
<li>
|
|
|
19 |
<a href="http://php.net/manual/en/ref.image.php" title="PHP image functions documentation">GD PHP Image Extension</a>, version 2.0.28 or newer.
|
|
|
20 |
Note that you <em>may</em> use GD starting with version 2.0.1, but you will lack GIF support.</li>
|
|
|
21 |
</ol>
|
|
|
22 |
<p> If your system satisfies this requirements, you will be able to generate <em>uncompressed</em>
|
|
|
23 |
Postscript files. Use <a href="http://www.cs.wisc.edu/~ghost/" title="More about GhostView">GhostView</a>
|
|
|
24 |
or any other Postscript viewer to view/print these files. Note that <em>Acrobat
|
|
|
25 |
Reader cannot read Poscript files!</em>
|
|
|
26 |
<p>
|
|
|
27 |
Also, use native DOM XML PHP extension if possible.
|
|
|
28 |
|
|
|
29 |
<h2>Highly recommended:</h2>
|
|
|
30 |
<ol>
|
|
|
31 |
<li><a href="http://php.net/manual/en/ref.zlib.php" title="Zlib documentation and installation instructions">Zlib</a>
|
|
|
32 |
PHP extension -- allows compressed Postscript file generation. Compression
|
|
|
33 |
greatly reduces the generated file size, up to 5-7 times, saving significant
|
|
|
34 |
bandwidth.</li>
|
|
|
35 |
<li><a href="http://www.cs.wisc.edu/~ghost/" title="Ghostscript download page">Ghostscript</a>
|
|
|
36 |
version 7.05 or newer -- allows generation of PDF files (strictly speaking,
|
|
|
37 |
script generates Postscript file, then converts it to PDF using Ghostscript).
|
|
|
38 |
<em>Please note that you'll need to have the ghostscript fonts package intalled
|
|
|
39 |
in order for this conversion to work!</em>. Also, keep in mind that Ghostscript
|
|
|
40 |
is an external program, so you'll need to have the <em>exec function enabled</em>
|
|
|
41 |
in your PHP configuration; if you're using PHP in safe mode, it is probably
|
|
|
42 |
disabled. It might be disabled even if safe mode is not in use. Please check
|
|
|
43 |
with your system administrator regarding the availability of the <i>exec</i>
|
|
|
44 |
function. </li>
|
|
|
45 |
<li><a href="http://php.net/manual/en/ref.pdf.php" title="PDFLIB PHP extension documentation and installation instructions">PDFLIB</a>
|
|
|
46 |
-- allows direct PDF generation; in general, PDF files generated via PDFLIB
|
|
|
47 |
have better image quality and renders a little bit faster than PDFs created
|
|
|
48 |
using Ghostscript. Nevertheless, PDFLIB is a non-free library, so you'll probably
|
|
|
49 |
will need to buy a license for it.</li>
|
|
|
50 |
|
|
|
51 |
</ol>
|
|
|
52 |
<p>If your system satisfies this requirements, you will be able to generated both
|
|
|
53 |
Postscript and PDF files.
|
|
|
54 |
<p>Note: You can choose either Ghostscript or PDFLIB (or both). Only one of these
|
|
|
55 |
packages is needed for PDF generation. Another option is to use the FPdf libraries,
|
|
|
56 |
which are bundled with html2ps/pdf. Using this method to generate PDFs is slower,
|
|
|
57 |
but does not require external libraries.
|
|
|
58 |
<h2>Recommended:</h2>
|
|
|
59 |
<ol>
|
|
|
60 |
<li><a href="http://ru.php.net/manual/en/ref.iconv.php" title="Iconv documentation and installation instructions">iconv</a>
|
|
|
61 |
PHP extension -- allows faster and more stable HTML page conversion from different
|
|
|
62 |
charsets (you can ignore this requirement if the pages you're working with
|
|
|
63 |
do not contain non-iso-8859-1 symbols -- central european or cyrillic, for
|
|
|
64 |
example)</li>
|
|
|
65 |
</ol>
|
|
|
66 |
<p>Systems satisfying these recommended requirements will have a minor boost in
|
|
|
67 |
conversion speed.
|
|
|
68 |
<h2>Recommended PHP configuration settings:</h2>
|
|
|
69 |
<ol>
|
|
|
70 |
<li>PHP Memory limit should be set to 32-62 megabytes;</li>
|
|
|
71 |
<li>PHP Script time execution limit should be set to 2-3 minutes;</li>
|
|
|
72 |
</ol>
|
|
|
73 |
<p>Systems NOT satisfying these requirements MAY be not able to process complicated
|
|
|
74 |
pages with big images. The exact values of these variables should be determined
|
|
|
75 |
experimentally (trial and error).</p>
|
|
|
76 |
|
|
|
77 |
<h2>Client-side software:</h2>
|
|
|
78 |
<ol>
|
|
|
79 |
<li> <a href="http://www.cs.wisc.edu/~ghost/" title="Ghostscript download page">Ghostscript</a>
|
|
|
80 |
version 7.05 or newer and <a href="http://www.cs.wisc.edu/~ghost/" title="GSView download page">GSView</a>
|
|
|
81 |
-- to view generated compressed and uncompressed files and to convert them
|
|
|
82 |
to PDF on the client side.</li>
|
|
|
83 |
<li> <a href="http://www.adobe.com/products/acrobat/matrix.html" title="Adobe Acrobat download page">Adobe
|
|
|
84 |
Acrobat Distiller</a> -- to convert Postscript files to PDF on the client
|
|
|
85 |
size (Ghostscript alternative). </li>
|
|
|
86 |
<li> <a href="http://www.adobe.com/products/acrobat/readstep2.html" title="Adobe Acrobar Reader download page">Adobe
|
|
|
87 |
Acrobat Reader</a> -- to view PDF files.</li>
|
|
|
88 |
</ol>
|
|
|
89 |
</body>
|
|
|
90 |
</html>
|