]> git.sesse.net Git - webpdf/blob - index.html
Support FG/BG colors in web pages.
[webpdf] / index.html
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!DOCTYPE
3   html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
4   "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
5 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
6   <head>
7     <title>PDF converter : sesse.net</title>
8     <meta name="description" content="Easily and freely create PDFs -- no strings attached" />
9     <link rel="stylesheet" href="http://www.sesse.net/sesse.css" type="text/css" />
10     <link rev="made" href="mailto:sgunderson@bigfoot.com" />
11     <meta name="MSSmartTagsPreventParsing" content="TRUE" />
12   </head>
13   <body>
14     <h1>PDF converter</h1>
15
16     <div class="boxes">
17       <div class="info">
18         <h2>Last updated</h2>
19         <p id="lastupdated">August 15th, 2005</p>
20       </div>
21
22       <div class="nav">
23           <span class="copy">&copy; 2005 <a href="http://www.sesse.net/">Steinar H. Gunderson</a>.</span></p>
24       </div>
25     </div>
26
27     <form method="post" action="createpdf.pl" enctype="multipart/form-data">
28       <table>
29         <tr>
30           <th>File:</th>
31           <td><input type="file" name="input" /></td>
32         </tr>
33         <tr>
34           <th><em>or</em> URL:</th>
35           <td><input type="text" name="url" size="40" /></td>
36         </tr>
37         <tr>
38           <th>PDF preset:</th>
39           <td>
40             <select name="preset">
41               <option value="default">Default</option>
42               <option value="screen">Screen (72dpi, no embedded fonts)</option>
43               <option value="ebook">eBook (150dpi)</option>
44               <option value="printer">Printer (300dpi)</option>
45               <option value="prepress">Prepress (300dpi, better JPEG quality)</option>
46             </select>
47           </td>
48         </tr>
49         <tr>
50           <td></td>
51           <td><input name="color" type="checkbox" /> Preserve FG/BG color in web pages</td>
52         </tr>
53         <tr>
54           <th colspan="2">
55             <input type="submit" value="Make PDF" />
56           </th>
57         </tr>
58       </table>
59     </form>
60
61     <p><em>Note:</em> Since 2005-08-12, I've installed a few extra fonts on
62       the server, which should solve most font problems for people. If you
63       still see them, try the “ebook” or better presets.</p>
64
65     <p>This is an “anything to PDF” converter, not unlike what you get
66       from <a href="http://createpdf.adobe.com/">Adobe's PDF Online service</a>,
67       but completely free and running entirely on free software. It is also
68       completely without any kind of warranty or uptime guarantees -- I'll
69       try to do my best keeping it up, but in case people start dumping
70       multi-gigabyte jobs etc. on it regularily I might just not be able to
71       do that. Please be nice :-)</p>
72
73     <p>Note that there is minimal security involved; you can even look at
74       <a href="last.pl">the last 20 submitted jobs</a> at any time (this
75       is also handy for resuming a big download). <strong>Do not submit
76       any sensitive data!</strong></p>
77
78     <p>The converter is currently based on <a href="http://www.ghostscript.com/">GPL
79       GhostScript</a> 8.01 (yes, a bit old); everything is pushed through it in one form or the
80       other (if only for image recompression etc.). The PDF presets match
81       exactly those in GhostScript itself -- see the
82       <a href="http://www.cs.wisc.edu/~ghost/doc/cvs/Ps2pdf.htm#Options">table
83       of options</a> for more details. (Note that anything except “default”
84       will override whatever input parameters there are in the input PostScript
85       file.)</p>
86
87     <p>The converter can currently handle the following formats, autodetected
88       by file extension <em>only</em>:</p>
89
90     <ul>
91       <li>PostScript (.ps) and Encapsulated PostScript (.pdf), via GS directly</li>
92       <li>Plain text (.txt), via mpage</li>
93       <li>BMP (.bmp), PNG (.png), JPEG (.jpg/.jpeg), XPM (.xpm), via <a href="http://www.imagemagick.com">ImageMagick</a>.</li>
94       <li>Microsoft Word (.doc), Excel (.xls) and PowerPoint (.ppt), via
95         <a href="http://www.openoffice.org">OpenOffice.org</a> (could be
96         slightly sketchy at times, let me know if it's broken).</li>
97       <li>Lots of different programming-related formats (.c, .pl, .js, etc.),
98         via <a href="http://www.vim.org/">Vim</a>.</li>
99       <li>Web pages, via <a href="http://www.mozilla.org/newlayout/">Gecko</a>
100         and <a href="http://cvs.gnome.org/viewcvs/gnome-web-photo/">gnome-web-photo</a>
101         (thanks to Tommi Komulainen for telling me about the latter :-) ).</li> 
102     </ul>
103
104     <p>Note that all URLs are currently treated as web pages; you cannot,
105       for instance, points to a PostScript file on the net and expect it
106       to be rendered correctly. Expect this to change in the not-too-distant
107       future.</p>
108
109     <h2>Source code</h2>
110
111     <p>I've had a few requests for the source code, so I put it online in
112       an <a href="http://arch.sesse.net/index.cgi/sgunderson@bigfoot.com--2005/webpdf--mainline--1.0">Arch archive</a>.
113       If you're not familiar with Arch, don't despair, here's how with
114       either tla or bazaar:</p>
115
116     <h3>Using tla</h3>
117     
118     <pre>tla register-archive sgunderson@bigfoot.com--2005 http://arch.sesse.net/sgunderson@bigfoot.com--2005
119 tla get sgunderson@bigfoot.com--2005/webpdf--mainline--1.0 webpdf/</pre>
120
121     <h3>Using bazaar</h3>
122
123 <pre>baz get http://arch.sesse.net/sgunderson@bigfoot.com--2005/webpdf--mainline--1.0 webpdf/</pre>
124   </body>
125 </html> 
126