comparison mupdf-source/docs/tools/mutool-trace.rst @ 3:2c135c81b16c

MERGE: upstream PyMuPDF 1.26.4 with MuPDF 1.26.7
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 15 Sep 2025 11:44:09 +0200
parents b50eed0cc0ef
children
comparison
equal deleted inserted replaced
0:6015a75abc2d 3:2c135c81b16c
1 mutool trace
2 ============
3
4 The ``trace`` command prints a trace of all the device calls used to render a page.
5
6 .. code-block:: bash
7
8 mutool trace [options] file [pages]
9
10 ``[options]``
11 Options are as follows:
12
13 ``-p`` password
14 Use the specified password if the file is encrypted.
15 ``-W`` width
16 Page width in points for EPUB layout.
17 ``-H`` height
18 Page height in points for EPUB layout.
19 ``-S`` size
20 Font size in points for EPUB layout.
21 ``-U`` filename
22 User CSS stylesheet for EPUB layout.
23 ``-X``
24 Disable document styles for EPUB layout.
25 ``-d``
26 Use display list.
27
28 ``file``
29 Input file name. The file can be any of the supported input formats.
30
31 ``[pages]``
32 Comma separated list of page ranges. The first page is "1", and the
33 last page is "N". The default is "1-N".
34
35 The trace takes the form of an XML document, with the root element being the
36 document, its children each page, and one page child element for each device
37 call on that page.
38
39 An example trace
40 ----------------
41
42 .. code-block:: xml
43
44 <document filename="hello.pdf">
45 <page number="1" mediabox="0 0 595 842">
46 <fill_path winding="nonzero" colorspace="DeviceRGB" color="1 0 0" transform="1 0 0 -1 0 842">
47 <moveto x="50" y="50"/>
48 <lineto x="100" y="200"/>
49 <lineto x="200" y="50"/>
50 </fill_path>
51 <fill_text colorspace="DeviceRGB" color="0" transform="1 0 0 -1 0 842">
52 <span font="Times-Roman" wmode="0" trm="100 0 0 100">
53 <g unicode="H" glyph="H" x="50" y="500" />
54 <g unicode="e" glyph="e" x="122.2" y="500" />
55 <g unicode="l" glyph="l" x="166.6" y="500" />
56 <g unicode="l" glyph="l" x="194.4" y="500" />
57 <g unicode="o" glyph="o" x="222.2" y="500" />
58 <g unicode="!" glyph="exclam" x="272.2" y="500" />
59 </span>
60 </fill_text>
61 </page>
62 </document>