From c88941abc6f0fe91a41dc35dcaa1874d4de2c429 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 7 Apr 2017 16:18:53 +0200 Subject: Organize docs into HTML files. --- docs/manual-mutool-create.html | 127 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 docs/manual-mutool-create.html (limited to 'docs/manual-mutool-create.html') diff --git a/docs/manual-mutool-create.html b/docs/manual-mutool-create.html new file mode 100644 index 00000000..0bb29305 --- /dev/null +++ b/docs/manual-mutool-create.html @@ -0,0 +1,127 @@ + + + +mutool create + + + + + + +
+

mutool create

+
+ + + +
+ +

+The create command creates a new PDF file with the contents created +from one or more input files containing graphics commands. + +

+mutool create [-o output.pdf] [-O options] page1.txt [page2.txt ...]
+
+ +

+If no output file is specified, it will write the created PDF to "out.pdf" in the current directory. + +

+The -O argument is a comma separated list of options for writing the PDF file: + +

+
decompress +
Decompress all object streams. + +
compress +
Compress all object streams. + +
compress-fonts +
Compress object streams for embedded fonts. + +
compress-images +
Compress object streams for images. + +
ascii +
Encode object streams using ASCII hex encoding. + +
pretty +
Pretty-print objects with indentation. + +
linearize +
Optimize document for progressive loading in viewers. + +
sanitize +
Clean up graphics command in content streams. + +
garbage[=compact|deduplicate] +
Garbage collect unused objects. With compact the cross-reference +table will also be compacted. With deduplicate duplicate objects +will also be recombined. +
+ +

+A page is created for each input file, with the contents of the +file copied into the content stream. Special comments in the +input files are parsed to define the page dimensions and font +and image resources: + +

+%%MediaBox 0 0 500 800
+%%Rotate 90
+%%Font Tm Times-Roman
+%%Font Fn0 path/to/font/file.ttf
+%%Image Im0 path/to/image.png
+
+ +

+An example input file: + +

+%%MediaBox 0 0 595 842
+%%Font F0 Times-Roman
+%%Image I0 logo/mupdf-simplified-logo.png
+
+% Draw an image.
+q
+480 0 0 480 50 250 cm
+/I0 Do
+Q
+
+% Draw a triangle.
+q
+1 0 0 rg
+50 50 m
+100 200 l
+200 50 l
+f
+Q
+
+% Show some text.
+q
+0 0 1 rg
+BT
+/F0 24 Tf
+50 760 Td
+(Hello, world!) Tj
+ET
+Q
+
+ +
+ + + + + -- cgit v1.2.3