From bd88b96f7b7b21d64d4fb32a2674653a08f8cb38 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 30 Apr 2018 17:23:06 +0200 Subject: Add selector syntax to 'mutool show'. --- docs/manual-mutool-show.html | 43 +++++++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 14 deletions(-) (limited to 'docs') diff --git a/docs/manual-mutool-show.html b/docs/manual-mutool-show.html index e9568fed..0805d108 100644 --- a/docs/manual-mutool-show.html +++ b/docs/manual-mutool-show.html @@ -25,11 +25,11 @@

The show command will print the specified objects and streams to -stdout. Streams are decoded and non-printable characters are +stdout. Streams are decoded and non-printable characters are represented with a period by default.

-mutool show [options] file.pdf [object numbers ...]
+mutool show [options] file.pdf ( xref | outline | grep | <path> ) *
 

@@ -40,29 +40,44 @@ Options:

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

-Specify objects by number, or use one of the following special names: +Specify what to show by using one of the following keywords, or specify a path +to an object:

-
'xref' or 'x' +
xref
Print the cross reference table. -
'trailer' or 't' -
Print the trailer dictionary. -
'encrypt' or 'e' -
Print the encryption dictionary. -
'pagetree' or 'p' +
outline +
Print the outline (table of contents). +
pages
List the object numbers for every page. -
'grep' or 'g' +
grep
Print all the objects in the file in a compact one-line format suitable for piping to grep. -
'outline' or 'o' -
Print the outline (table of contents). +
+ +

+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/N where N is the page number. +The first page is number 1. + +

+
Find the number of pages in a document: +
mutool show $FILE trailer/Pages/Count +
Print the raw content stream of the first page: +
mutool show -b $FILE pages/1/Contents +
Show all JPEG compressed stream objects: +
mutool show $FILE grep | grep '/Filter/DCTDecode'
-- cgit v1.2.3