From 1202a24a5b2729093545a89d013eaef1557a5fe9 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 4 Jan 2018 12:46:27 +0100 Subject: Update 'mutool run' man page. --- docs/manual-mutool-run.html | 62 ++++++++++----------------------------------- 1 file changed, 14 insertions(+), 48 deletions(-) (limited to 'docs') diff --git a/docs/manual-mutool-run.html b/docs/manual-mutool-run.html index a592d3f5..54b96ae6 100644 --- a/docs/manual-mutool-run.html +++ b/docs/manual-mutool-run.html @@ -35,8 +35,6 @@ mutool run script.js [ arguments ... ]

If invoked without any arguments, it will drop you into an interactive REPL (read-eval-print-loop). -On the interactive prompt, if you prefix a line with an equal ('=') character it will automatically print the result -of the line.

Example scripts @@ -212,8 +210,9 @@ If skipAnnotations is true, ignore annotations. If alpha is true, the page will be drawn on a transparent background, otherwise white.
Page#toDisplayList(skipAnnotations)
Record the contents on the page into a DisplayList. -
Page#toStructuredText() +
Page#toStructuredText(options)
Extract the text on the page into a StructuredText object. +The options argument is a comma separated list of flags: preserve-ligatures, preserve-whitespace, and preserve-images.
Page#search(needle)
Search for 'needle' text on the page, and return an array with rectangles of all matches found.
Page#getAnnotations() @@ -235,8 +234,8 @@ depending on whether it's an internal or external link.
Render the annotation into a Pixmap, using the transform and colorspace.
Annotation#toDisplayList()
Record the contents of the annotation into a DisplayList. -
Annotation#toPDF() -
Returns the PDFObject/PDFAnnotation for the annotation, if the document is a PDF file. +
Annotation#isPDF() +
Returns true if the annotation is from a PDF document.

@@ -250,10 +249,10 @@ StructuredText objects hold text from a page that has been analyzed and grouped
StructuredText#search(needle)
Search the text for all instances of 'needle', and return an array with rectangles of all matches found. -
StructuredText#highlight(rect) -
Return an array with rectangles needed to highlight a selection defined by the two corners of the rectangle. -
StructuredText#copy(rect) -
Return the text from the selection defined by the two corners of the rectangle. +
StructuredText#highlight(p, q) +
Return an array with rectangles needed to highlight a selection defined by the start and end points. +
StructuredText#copy(p, q) +
Return the text from the selection defined by the start and end points.

@@ -339,8 +338,9 @@ will keep all the graphics required in memory, so will increase the amount of me
Play back the recorded device calls onto the device.
DisplayList#toPixmap(transform, colorspace, alpha)
Render display list to a pixmap. If alpha is true, it will render to a transparent background, otherwise white. -
DisplayList#toStructuredText(skipAnnotations) +
DisplayList#toStructuredText(options)
Extract the text in the display list into a StructuredText object. +The options argument is a comma separated list of flags: preserve-ligatures, preserve-whitespace, and preserve-images.
DisplayList#search(needle)
Search the display list text for all instances of 'needle', and return an array with rectangles of all matches found.
@@ -469,7 +469,7 @@ A Path object represents vector graphics as drawn by a pen. A path can be either
Path#rect(x1, y1, x2, y2)
Shorthand for moveTo, lineTo, lineTo, lineTo, closePath to draw a rectangle.
Path#walk(pathWalker) -
Call moveTo, lineTo, curveTo and closePath methods on the pathWalker to replay the path. +
Call moveTo, lineTo, curveTo and closePath methods on the pathWalker object to replay the path.

@@ -491,7 +491,7 @@ WMode is 0 for horizontal writing, and 1 for vertical writing.
Text#showString(font, transform, string)
Add a simple string to the text object. Will do font substitution if the font does not have all the unicode characters required.
Text#walk(textWalker) -
Call showGlyph on textWalker for each glyph in the text object. +
Call the showGlyph method on the textWalker object for each glyph in the text object.

@@ -561,42 +561,8 @@ The argument must be the same device object that was returned by the beginPage m

-The current output formats supported are CBZ, PNG and PDF. - -

-The image format (CBZ, PNG, etc) output options are: -

-
rotate=N -
Rotate rendered pages N degrees counterclockwise. -
resolution=N, x-resolution=N, y-resolution=N -
Render each page to an image at N pixels per inch. -
width=N -
Render pages to fit N pixels wide (ignore resolution option). -
height=N -
Render pages to fit N pixels tall (ignore resolution option). -
colorspace=(gray|rgb|cmyk) -
Render using specified colorspace. -
alpha -
Render pages with alpha channel and transparent background. - -
- -

-The PDF output options are: -

-
linearize
optimize for web browsers. -
garbage -
remove unused objects. -
garbage=compact
Remove unused objects, and compact cross reference table. -
garbage=deduplicate
Remove unused objects, compact cross reference table, and remove duplicate objects. -
pretty
Pretty-print objects with indentation. -
ascii
ASCII hex encode binary streams. -
compress-fonts
Compress embedded fonts. -
compress-images
Compress images. -
compress
Compress all streams. -
decompress
Decompress all streams (except when compress-fonts or compress-images). -
sanitize
Clean up graphics commands in content streams. -
+The output formats and options supported are the same as in the +mutool convert command.

PDFDocument and PDFObject -- cgit v1.2.3