summaryrefslogtreecommitdiff
path: root/docs/manual-mutool-show.html
blob: 3050a616e54439b098f162c2bd5958e19261dad7 (plain)
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
<!DOCTYPE html>
<html>
<head>
<title>mutool show</title>
<link rel="stylesheet" href="style.css" type="text/css">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>

<body>

<header>
<h1>mutool show</h1>
</header>

<nav>
<a href="http://mupdf.com/index.html">About</a>
<a href="http://mupdf.com/news.html">News</a>
<a href="index.html">Documentation</a>
<a href="http://mupdf.com/downloads/">Downloads</a>
<a href="http://git.ghostscript.com/?p=mupdf.git;a=summary">Source</a>
<a href="https://bugs.ghostscript.com/">Bugs</a>
</nav>

<article>

<p>
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.

<pre>
mutool show [options] file.pdf ( xref | outline | grep | <i>&lt;path&gt;</i> ) *
</pre>

<p>
Options:

<dl>
<dt> -p password
<dd> Use the specified password if the file is encrypted.
<dt> -o file
<dd> Write output to file instead of stdout.
<dt> -e
<dd> Print streams in their original encoded (or compressed) form.
<dt> -b
<dd> Print streams as binary data, and omit the object.
<dt> -g
<dd> Print objects in a one-line form suitable for grep, and omit stream data.
</dl>

<p>
Specify what to show by using one of the following keywords, or specify a path
to an object:

<dl>
<dt> xref
<dd> Print the cross reference table.
<dt> outline
<dd> Print the outline (table of contents).
<dt> pages
<dd> List the object numbers for every page.
<dt> grep
<dd> Print all the objects in the file in a compact one-line format
suitable for piping to grep.
</dl>

<p>
A path starts with either an object number, a property in the trailer
dictionary, or the keyword "trailer" or "pages". Separate elements with
a period '.' or slash '/'.
Select a page object by using pages/<i>N</i> where N is the page number.
The first page is number 1.
You can also use '*' as an element to iterate over all array indices
or dictionary properties in an object.

<dl>
<dt> Find the number of pages in a document:
<dd> <tt>mutool show $FILE trailer/Pages/Count</tt>
<dt> Print the raw content stream of the first page:
<dd> <tt>mutool show -b $FILE pages/1/Contents</tt>
<dt> Show all JPEG compressed stream objects:
<dd> <tt>mutool show $FILE grep | grep '/Filter/DCTDecode'</tt>
</dl>

</article>

<footer>
<a href="http://artifex.com"><img src="artifex-logo.png" align="right"></a>
Copyright &copy; 2006-2017 Artifex Software Inc.
</footer>

</body>
</html>