source: main/trunk/greenstone2/bin/linux/xpdf-tools/doc/pdftopng.1@ 32205

Last change on this file since 32205 was 32205, checked in by ak19, 6 years ago

First set of commits to do with implementing the new 'paged_html' output option of PDFPlugin that uses using xpdftools' new pdftohtml. So far tested only on Linux (64 bit), but things work there so I'm optimistically committing the changes since they work. 2. Committing the pre-built Linux binaries of XPDFtools for both 32 and 64 bit built by the XPDF group. 2. To use the correct bitness variant of xpdftools, setup.bash now exports the BITNESS env var, consulted by gsConvert.pl. 3. All the perl code changes to do with using xpdf tools' pdftohtml to generate paged_html and feed it in the desired form into GS(3): gsConvert.pl, PDFPlugin.pm and its parent ConvertBinaryPFile.pm have been modified to make it all work. xpdftools' pdftohtml generates a folder containing an html file and a screenshot for each page in a PDF (as well as an index.html linking to each page's html). However, we want a single html file that contains each individual 'page' html's content in a div, and need to do some further HTML style, attribute and structure modifications to massage the xpdftool output to what we want for GS. In order to parse and manipulate the HTML 'DOM' to do this, we're using the Mojo::DOM package that Dr Bainbridge found and which he's compiled up. Mojo::DOM is therefore also committed in this revision. Some further changes and some display fixes are required, but need to check with the others about that.

File size: 3.0 KB
Line 
1.\" Copyright 2017 Glyph & Cog, LLC
2.TH pdftopng 1 "10 Aug 2017"
3.SH NAME
4pdftopng \- Portable Document Format (PDF) to Portable Network Graphics
5(PNG) converter (version 4.00)
6.SH SYNOPSIS
7.B pdftopng
8[options]
9.I PDF-file PNG-root
10.SH DESCRIPTION
11.B Pdftopng
12converts Portable Document Format (PDF) files to color, grayscale, or
13monochrome image files in Portable Network Graphics (PNG) format.
14.PP
15Pdftopng reads the PDF file,
16.IR PDF-file ,
17and writes one PNG file for each page,
18.IR PNG-root - nnnnnn .png,
19where
20.I nnnnnn
21is the page number.
22If
23.I PNG-root
24is \'-', the image is sent to stdout (this is probably only useful
25when converting a single page).
26.SH CONFIGURATION FILE
27Pdftopng reads a configuration file at startup. It first tries to
28find the user's private config file, ~/.xpdfrc. If that doesn't
29exist, it looks for a system-wide config file, typically
30/usr/local/etc/xpdfrc (but this location can be changed when pdftopng
31is built). See the
32.BR xpdfrc (5)
33man page for details.
34.SH OPTIONS
35Many of the following options can be set with configuration file
36commands. These are listed in square brackets with the description of
37the corresponding command line option.
38.TP
39.BI \-f " number"
40Specifies the first page to convert.
41.TP
42.BI \-l " number"
43Specifies the last page to convert.
44.TP
45.BI \-r " number"
46Specifies the resolution, in DPI. The default is 150 DPI.
47.TP
48.B \-mono
49Generate a monochrome image (instead of a color image).
50.TP
51.B \-gray
52Generate a grayscale image (instead of a color image).
53.TP
54.B \-alpha
55Generate an alpha channel in the PNG file. This is only useful with
56PDF files that have been constructed with a transparent background.
57The \-alpha flag cannot be used with \-mono.
58.TP
59.BI \-freetype " yes | no"
60Enable or disable FreeType (a TrueType / Type 1 font rasterizer).
61This defaults to "yes".
62.RB "[config file: " enableFreeType ]
63.TP
64.BI \-aa " yes | no"
65Enable or disable font anti-aliasing. This defaults to "yes".
66.RB "[config file: " antialias ]
67.TP
68.BI \-aaVector " yes | no"
69Enable or disable vector anti-aliasing. This defaults to "yes".
70.RB "[config file: " vectorAntialias ]
71.TP
72.BI \-opw " password"
73Specify the owner password for the PDF file. Providing this will
74bypass all security restrictions.
75.TP
76.BI \-upw " password"
77Specify the user password for the PDF file.
78.TP
79.B \-q
80Don't print any messages or errors.
81.RB "[config file: " errQuiet ]
82.TP
83.B \-v
84Print copyright and version information.
85.TP
86.B \-h
87Print usage information.
88.RB ( \-help
89and
90.B \-\-help
91are equivalent.)
92.SH EXIT CODES
93The Xpdf tools use the following exit codes:
94.TP
950
96No error.
97.TP
981
99Error opening a PDF file.
100.TP
1012
102Error opening an output file.
103.TP
1043
105Error related to PDF permissions.
106.TP
10799
108Other error.
109.SH AUTHOR
110The pdftopng software and documentation are copyright 1996-2017 Glyph
111& Cog, LLC.
112.SH "SEE ALSO"
113.BR xpdf (1),
114.BR pdftops (1),
115.BR pdftotext (1),
116.BR pdftohtml (1),
117.BR pdfinfo (1),
118.BR pdffonts (1),
119.BR pdfdetach (1),
120.BR pdftoppm (1),
121.BR pdfimages (1),
122.BR xpdfrc (5)
123.br
124.B http://www.xpdfreader.com/
Note: See TracBrowser for help on using the repository browser.