blob: 05e324c10213e00575990bac199bf5c34bd76a1b (
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
94
95
96
97
98
99
100
101
102
|
<!DOCTYPE html>
<html>
<head>
<title>mutool trace</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 trace</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/">DOWNLOAD</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 'mutool trace' command prints a trace of device calls needed to render a page.
<pre>
mutool trace [options] input [pages]
</pre>
<p>
The command line options are:
<dl>
<dt><i>input</i>
<dd>Input file name.
The input can be any of the document formats supported by MuPDF: PDF, XPS, CBZ, unprotected EPUB, FB2, etc.
<dt>[pages]
<dd>Comma separated list of page ranges. The first page is "1", and the last page is "N". The default is "1-N".
<dt>-p <i>password</i>
<dd>Password to use for password protected PDF documents.
</dl>
<dl>
<dt>-W <i>width</i>
<dd>Page width in points for EPUB layout.
<dt>-H <i>height</i>
<dd>Page height in points for EPUB layout.
<dt>-S <i>font-size</i>
<dd>Font size in points for EPUB layout.
<dt>-U <i>stylesheet.css</i>
<dd>File name of user style sheet for EPUB layout.
<dt>-X
<dd>Disable document styles for EPUB layout.
</dl>
<dl>
<dt>-d
<dd>Use display list. Run the page to a display list first, then trace running the display list.
</dl>
<p>
The trace takes the form of an XML document, with the root element being the document,
its children each page, and one page child element for each device call on that page.
<p>
An example trace:
<pre>
<document filename="hello.pdf">
<page number="1" mediabox="0 0 595 842">
<fill_path winding="nonzero" colorspace="DeviceRGB" color="1 0 0" matrix="1 0 0 -1 0 842">
<moveto x="50" y="50"/>
<lineto x="100" y="200"/>
<lineto x="200" y="50"/>
</fill_path>
<fill_text colorspace="DeviceRGB" color="0" matrix="1 0 0 -1 0 842">
<span font="Times-Roman" wmode="0" trm="100 0 0 100">
<g unicode="H" glyph="H" x="50" y="500" />
<g unicode="e" glyph="e" x="122.2" y="500" />
<g unicode="l" glyph="l" x="166.6" y="500" />
<g unicode="l" glyph="l" x="194.4" y="500" />
<g unicode="o" glyph="o" x="222.2" y="500" />
<g unicode="!" glyph="exclam" x="272.2" y="500" />
</span>
</fill_text>
</page>
</document>
</pre>
</article>
<footer>
<a href="http://artifex.com"><img src="artifex-logo.png" align="right"></a>
Copyright © 2006-2017 Artifex Software Inc.
</footer>
</body>
</html>
|