summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/index.html4
-rw-r--r--docs/manual-mutool-trace.html102
2 files changed, 105 insertions, 1 deletions
diff --git a/docs/index.html b/docs/index.html
index 314578f3..f91906d4 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -61,7 +61,7 @@ The iOS viewer is available on the <a href="https://itunes.apple.com/us/app/mupd
The command line tools are all gathered into one umbrella command: mutool.
<p>
-For rendering and converting documents there are two commands available:
+For rendering and converting documents there are three commands available:
<dl>
<dt><a href="manual-mutool-draw.html">mutool draw</a>
@@ -69,6 +69,8 @@ For rendering and converting documents there are two commands available:
It is primarily used for rendering a document to image files.
<dt><a href="manual-mutool-convert.html">mutool convert</a>
<dd>This tool is used for converting documents into other formats, and is easier to use.
+<dt><a href="manual-mutool-trace.html">mutool trace</a>
+<dd>This is a debugging tool used for printing a trace of the graphics device calls on a page.
</dl>
<p>
diff --git a/docs/manual-mutool-trace.html b/docs/manual-mutool-trace.html
new file mode 100644
index 00000000..05e324c1
--- /dev/null
+++ b/docs/manual-mutool-trace.html
@@ -0,0 +1,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>
+&lt;document filename="hello.pdf"&gt;
+&lt;page number="1" mediabox="0 0 595 842"&gt;
+&lt;fill_path winding="nonzero" colorspace="DeviceRGB" color="1 0 0" matrix="1 0 0 -1 0 842"&gt;
+&lt;moveto x="50" y="50"/&gt;
+&lt;lineto x="100" y="200"/&gt;
+&lt;lineto x="200" y="50"/&gt;
+&lt;/fill_path&gt;
+&lt;fill_text colorspace="DeviceRGB" color="0" matrix="1 0 0 -1 0 842"&gt;
+&lt;span font="Times-Roman" wmode="0" trm="100 0 0 100"&gt;
+&lt;g unicode="H" glyph="H" x="50" y="500" /&gt;
+&lt;g unicode="e" glyph="e" x="122.2" y="500" /&gt;
+&lt;g unicode="l" glyph="l" x="166.6" y="500" /&gt;
+&lt;g unicode="l" glyph="l" x="194.4" y="500" /&gt;
+&lt;g unicode="o" glyph="o" x="222.2" y="500" /&gt;
+&lt;g unicode="!" glyph="exclam" x="272.2" y="500" /&gt;
+&lt;/span&gt;
+&lt;/fill_text&gt;
+&lt;/page&gt;
+&lt;/document&gt;
+
+</pre>
+
+</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>