From b66925c26188075d843f7661f8d0a21eeb37ec22 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 13 Jul 2017 15:28:09 +0200 Subject: Add 'mutool trace' command. --- docs/index.html | 4 +- docs/manual-mutool-trace.html | 102 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 105 insertions(+), 1 deletion(-) create mode 100644 docs/manual-mutool-trace.html (limited to 'docs') 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 mutool draw @@ -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.
mutool convert
This tool is used for converting documents into other formats, and is easier to use. +
mutool trace +
This is a debugging tool used for printing a trace of the graphics device calls on a page.

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 @@ + + + +mutool trace + + + + + + +

+

mutool trace

+
+ + + +
+ +

+The 'mutool trace' command prints a trace of device calls needed to render a page. + +

+mutool trace [options] input [pages]
+
+ +

+The command line options are: + +

+
input +
Input file name. + The input can be any of the document formats supported by MuPDF: PDF, XPS, CBZ, unprotected EPUB, FB2, etc. +
[pages] +
Comma separated list of page ranges. The first page is "1", and the last page is "N". The default is "1-N". +
-p password +
Password to use for password protected PDF documents. +
+ +
+
-W width +
Page width in points for EPUB layout. +
-H height +
Page height in points for EPUB layout. +
-S font-size +
Font size in points for EPUB layout. +
-U stylesheet.css +
File name of user style sheet for EPUB layout. +
-X +
Disable document styles for EPUB layout. +
+ +
+
-d +
Use display list. Run the page to a display list first, then trace running the display list. +
+ +

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

+An example trace: + +

+<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>
+
+
+ +
+ + + + + -- cgit v1.2.3