1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
|
.TH "MUTOOL" "1" "July 25, 2013"
.\" Please adjust this date whenever revising the manpage.
.\" no hyphenation
.nh
.\" adjust left
.ad l
.SH NAME
mutool \- all purpose tool for dealing with PDF files
.SH SYNOPSIS
mutool <sub-command> [options]
.SH DESCRIPTION
mutool is a tool based on MuPDF for dealing with PDF files in various manners.
There are several sub commands available, as described below.
.SH CLEAN
mutool clean [options] input.pdf [output.pdf] [pages]
.PP
The clean command pretty prints and rewrites the syntax of a PDF file.
It can be used to repair broken files, expand compressed streams, filter
out a range of pages, etc.
.PP
If no output file is specified, it will write the cleaned PDF to "out.pdf"
in the current directory.
.TP
.B \-p password
Use the specified password if the file is encrypted.
.TP
.B \-g
Garbage collect objects that have no references from other objects.
Give the option twice to renumber all objects and compact the cross reference table.
Give it three times to merge and reuse duplicate objects.
.TP
.B \-d
Decompress streams. This will make the output file larger, but provides
easy access for reading and editing the contents with a text editor.
.TP
.B \-l
Linearize output. Create a "Web Optimized" output file.
.TP
.B \-i
Toggle decompression of image streams. Use in conjunction with -d to leave
image- compressed.
.TP
.B \-f
Toggle decompression of font streams. Use in conjunction with -d to leave
fonts compressed.
.TP
.B \-a
ASCII Hex encode binary streams. Use in conjuction with -d and -i or -f to
ensure that although the images and/or fonts are compressed, the resulting
file can still be viewed and edited with a text editor.
.TP
.B pages
Comma separated list of page ranges to include.
.SH EXTRACT
mutool extract [options] file.pdf [object numbers]
.PP
The extract command can be used to extract images and font files from a PDF.
If no object numbers are given on the command line, all images and fonts
will be extracted.
.TP
.B \-p password
Use the specified password if the file is encrypted.
.TP
.B \-r
Convert images to RGB when extracting them.
.SH INFO
TODO
.SH POSTER
mutool poster [options] input.pdf [output.pdf]
.PP
The poster command splits each page into tiles, and puts each tile on
a page of its own. It's useful for printing a large page onto smaller
pieces of paper that can then be glued together to create a large poster.
.TP
.B \-p password
Use the specified password if the file is encrypted.
.TP
.B \-x factor
Split the page into this many horizontal pieces.
.TP
.B \-y factor
Split the page into this many vertical pieces.
.PP
The output will have x times y number of pages for each input page.
.SH SHOW
mutool show [options] file.pdf [object numbers ...]
.PP
The show command will print the specified objects and streams to stdout.
Streams are decoded and non-printable characters are represented
with a period by default.
.TP
.B \-b
Print streams as binary data and omit the object header.
.TP
.B \-e
Print streams in their original encoded (or compressed) form.
.TP
.B \-p password
Use the specified password if the file is encrypted.
.PP
Specify objects by number, or use one of the following special names:
.TP
.B 'xref' or 'x'
Print the cross reference table.
.TP
.B 'trailer' or 't'
Print the trailer dictionary.
.TP
.B 'pages' or 'p'
List the object numbers for every page.
.TP
.B 'grep' or 'g'
Print all the objects in the file in a compact one-line format suitable for piping to grep.
.SH SEE ALSO
.BR mudraw (1).
.BR mupdf (1),
.SH AUTHOR
MuPDF is Copyright 2006-2014 Artifex Software, Inc.
|