## qpdf flags / usage commands

qpdf --help

Usage: qpdf [ options ] { infilename | --empty } [ outfilename ]

An option summary appears below.  Please see the documentation for details.

If @filename appears anywhere in the command-line, each line of filename
will be interpreted as an argument. No interpolation is done. Line
terminators are stripped. @- can be specified to read from standard input.

Note that when contradictory options are provided, whichever options are
provided last take precedence.

Basic Options
-------------

--version               show version of qpdf
--help                  show command-line argument help
--linearize             generated a linearized (web optimized) file
--copy-encryption=file  copy encryption parameters from specified file
password used to open the file from which encryption
parameters are being copied
--encrypt options --    generate an encrypted file
--decrypt               remove any encryption on the file
--pages options --      select specific pages from one or more files
--rotate=[+|-]angle:page-range
rotate each specified page 90, 180, or 270 degrees
--split-pages=[n]       write each output page to a separate file

If none of --copy-encryption, --encrypt or --decrypt are given, qpdf will
preserve any encryption data associated with a file.

Note that when copying encryption parameters from another file, all
parameters will be copied, including both user and owner passwords, even
if the user password is used to open the other file.  This works even if
the owner password is not known.

The --password-is-hex-key option overrides the normal computation of
encryption keys. It only applies to the password used to open the main
file. This option is not ordinarily useful but can be helpful for forensic
or investigatory purposes. See manual for further discussion.

The --rotate flag can be used to specify pages to rotate pages either
90, 180, or 270 degrees. The page range is specified in the same
format as with the --pages option, described below. Repeat the option
to rotate multiple groups of pages. If the angle is preceded by + or -,
it is added to or subtracted from the original rotation. Otherwise, the
rotation angle is set explicitly to the given value.

If --split-pages is specified, each page is written to a separate output
file. File names are generated as follows:
* If the string %d appears in the output file name, it is replaced with a
zero-padded page range starting from 1
* Otherwise, if the output file name ends in .pdf (case insensitive), a
zero-padded page range, preceded by a dash, is inserted before the file
extension
* Otherwise, the file name is appended with a zero-padded page range
preceded by a dash.
Page ranges are single page numbers for single-page groups or first-last
for multipage groups.

Encryption Options
------------------

Note that -- terminates parsing of encryption flags.

Either or both of the user password and the owner password may be
empty strings.

key-length may be 40, 128, or 256

Additional flags are dependent upon key length.

If 40:

--print=[yn]             allow printing
--modify=[yn]            allow document modification
--extract=[yn]           allow text/graphic extraction
--annotate=[yn]          allow comments and form fill-in and signing

If 128:

--accessibility=[yn]     allow accessibility to visually impaired
--extract=[yn]           allow other text/graphic extraction
--print=print-opt        control printing access
--modify=modify-opt      control modify access
--use-aes=[yn]           indicates whether to use AES encryption
--force-V4               forces use of V=4 encryption handler

If 256, options are the same as 128 with these exceptions:
--force-V4               this option is not available with 256-bit keys
--use-aes                this option is always on with 256-bit keys
--force-R5               forces use of deprecated R=5 encryption

print-opt may be:

full                  allow full printing
low                   allow only low-resolution printing
none                  disallow printing

modify-opt may be:

all                   allow full document modification
annotate              allow comment authoring and form operations
form                  allow form field fill-in and signing
assembly              allow document assembly only
none                  allow no modifications

The default for each permission option is to be fully permissive.

Specifying use of AES forces the PDF version to at least 1.6.  These
options are both off by default.

The --force-V4 flag forces the V=4 encryption handler introduced in PDF 1.5
to be used even if not otherwise needed.  This option is primarily useful
for testing qpdf and has no other practical use.

Page Selection Options
----------------------

These options allow pages to be selected from one or more PDF files.
Whatever file is given as the primary input file is used as the
starting point, but its pages are replaced with pages as specified.

For each file that pages should be taken from, specify the file, a
password needed to open the file (if any), and a page range.  The
password needs to be given only once per file.  If any of the input
files are the same as the primary input file or the file used to copy
encryption parameters (if specified), you do not need to repeat the
password here.  The same file can be repeated multiple times.  All
non-page data (info, outlines, page numbers, etc. are taken from the
primary input file.  To discard this, use --empty as the primary
input.

The page range is a set of numbers separated by commas, ranges of
numbers separated dashes, or combinations of those.  The character
"z" represents the last page.  A number preceded by an "r" indicates
to count from the end, so "r3-r1" would be the last three pages of the
document.  Pages can appear in any order.  Ranges can appear with a
high number followed by a low number, which causes the pages to appear in
reverse.  Repeating a number will cause an error, but the manual discusses
a workaround should you really want to include the same page twice.

If the page range is omitted, the range of 1-z is assumed.  qpdf decides
that the page range is omitted if the range argument is either -- or a
valid file name and not a valid range.

See the manual for examples and a discussion of additional subtleties.

-------------------------------

These options control aspects of how qpdf reads PDF files. Mostly these are
of use to people who are working with damaged files. There is little reason
to use these options unless you are trying to solve specific problems.

--suppress-recovery       prevents qpdf from attempting to recover damaged files
--ignore-xref-streams     tells qpdf to ignore any cross-reference streams

-------------------------------

These transformation options control fine points of how qpdf creates
the output file.  Mostly these are of use only to people who are very
familiar with the PDF file format or who are PDF developers.

--stream-data=option      controls transformation of stream data (below)
--compress-streams=[yn]   controls whether to compress streams on output
--decode-level=option     controls how to filter streams from the input
--normalize-content=[yn]  enables or disables normalization of content streams
--object-streams=mode     controls handing of object streams
--preserve-unreferenced   preserve unreferenced objects
--newline-before-endstream  always put a newline before endstream
--coalesce-contents       force all pages' content to be a single stream
--qdf                     turns on "QDF mode" (below)
--linearize-pass1=file    write intermediate pass of linearized file
for debugging
--force-version=version   forces this to be the PDF version of the output file

Version numbers may be expressed as major.minor.extension-level, so 1.7.3

Values for stream data options:

compress              recompress stream data when possible (default)
preserve              leave all stream data as is
uncompress            uncompress stream data when possible

Values for object stream mode:

preserve                  preserve original object streams (default)
disable                   don't write any object streams
generate                  use object streams wherever possible

When --compress-streams=n is specified, this overrides the default behavior
of qpdf, which is to attempt compress uncompressed streams. Setting
stream data mode to uncompress or preserve has the same effect.

The --decode-level parameter may be set to one of the following values:
none              do not decode streams
generalized       decode streams compressed with generalized filters
including LZW, Flate, and the ASCII encoding filters.
specialized       additionally decode streams with non-lossy specialized
filters including RunLength
all               additionally decode streams with lossy filters
including DCT (JPEG)

In qdf mode, by default, content normalization is turned on, and the
stream data mode is set to uncompress.

Setting the minimum PDF version of the output file may raise the version
but will never lower it.  Forcing the PDF version of the output file may
set the PDF version to a lower value than actually allowed by the file's
contents.  You should only do this if you have no other possible way to
open the file or if you know that the file definitely doesn't include
features not supported later versions.

Testing, Inspection, and Debugging Options
------------------------------------------

These options can be useful for digging into PDF files or for use in
automated test suites for software that uses the qpdf library.

--deterministic-id        generate deterministic /ID
--static-id               generate static /ID: FOR TESTING ONLY!
--static-aes-iv           use a static initialization vector for AES-CBC
This is option is not secure!  FOR TESTING ONLY!
--no-original-object-ids  suppress original object ID comments in qdf mode
--show-encryption         quickly show encryption parameters
--show-encryption-key     when showing encryption, reveal the actual key
--check-linearization     check file integrity and linearization status
--show-linearization      check and show all linearization data
--show-xref               show the contents of the cross-reference table
--show-object=obj[,gen]   show the contents of the given object
--raw-stream-data       show raw stream data instead of object contents
--filtered-stream-data  show filtered stream data instead of object contents
--show-npages             print the number of pages in the file
--show-pages              shows the object/generation number for each page
--with-images           also shows the object IDs for images on each page
--check                   check file structure + encryption, linearization

The --raw-stream-data and --filtered-stream-data options are ignored
unless --show-object is given.  Either of these options will cause the
stream data to be written to standard output.

If --filtered-stream-data is given and --normalize-content=y is also
given, qpdf will attempt to normalize the stream data as if it is a
page content stream.  This attempt will be made even if it is not a
page content stream, in which case it will produce unusable results.

Ordinarily, qpdf exits with a status of 0 on success or a status of 2
if any errors occurred.  In --check mode, if there were warnings but not
errors, qpdf exits with a status of 3.



## textract usage flags / command options

basic usage is as simple as

textract filename.png -o output.txt

The above command will output the text contents of the image to the file output.txt

All usage flags / command options are as follows:

usage: textract [-h]
[-e {aliases,ascii,base64_codec,big5,big5hkscs,bz2_codec,charmap,cp037,cp1006,cp1026,cp1140,cp1250,cp1251,cp1252,cp1253,cp1254,cp1255,cp1256,cp1257,cp1258,cp424,cp437,cp500,cp720,cp737,cp775,cp850,cp852,cp855,cp856,cp857,cp858,cp860,cp861,cp862,cp863,cp864,cp865,cp866,cp869,cp874,cp875,cp932,cp949,cp950,euc_jis_2004,euc_jisx0213,euc_jp,euc_kr,gb18030,gb2312,gbk,hex_codec,hp_roman8,hz,idna,iso2022_jp,iso2022_jp_1,iso2022_jp_2,iso2022_jp_2004,iso2022_jp_3,iso2022_jp_ext,iso2022_kr,iso8859_1,iso8859_10,iso8859_11,iso8859_13,iso8859_14,iso8859_15,iso8859_16,iso8859_2,iso8859_3,iso8859_4,iso8859_5,iso8859_6,iso8859_7,iso8859_8,iso8859_9,johab,koi8_r,koi8_u,latin_1,mac_arabic,mac_centeuro,mac_croatian,mac_cyrillic,mac_farsi,mac_greek,mac_iceland,mac_latin2,mac_roman,mac_romanian,mac_turkish,mbcs,palmos,ptcp154,punycode,quopri_codec,raw_unicode_escape,rot_13,shift_jis,shift_jis_2004,shift_jisx0213,string_escape,tactis,tis_620,undefined,unicode_escape,unicode_internal,utf_16,utf_16_be,utf_16_le,utf_32,utf_32_be,utf_32_le,utf_7,utf_8,utf_8_sig,uu_codec,zlib_codec}]
[--extension {.csv,.doc,.docx,.eml,.epub,.gif,.htm,.html,.jpeg,.jpg,.json,.log,.mp3,.msg,.odt,.ogg,.pdf,.png,.pptx,.ps,.psv,.rtf,.tff,.tif,.tiff,.tsv,.txt,.wav,.xls,.xlsx,csv,doc,docx,eml,epub,gif,htm,html,jpeg,jpg,json,log,mp3,msg,odt,ogg,pdf,png,pptx,ps,psv,rtf,tff,tif,tiff,tsv,txt,wav,xls,xlsx}]
[-m METHOD] [-o OUTPUT] [-O OPTION] [-v]
filename

Command line tool for extracting text from any document.

positional arguments:
filename              Filename to extract text.

optional arguments:
-h, --help            show this help message and exit
-e {aliases,ascii,base64_codec,big5,big5hkscs,bz2_codec,charmap,cp037,cp1006,cp1026,cp1140,cp1250,cp1251,cp1252,cp1253,cp1254,cp1255,cp1256,cp1257,cp1258,cp424,cp437,cp500,cp720,cp737,cp775,cp850,cp852,cp855,cp856,cp857,cp858,cp860,cp861,cp862,cp863,cp864,cp865,cp866,cp869,cp874,cp875,cp932,cp949,cp950,euc_jis_2004,euc_jisx0213,euc_jp,euc_kr,gb18030,gb2312,gbk,hex_codec,hp_roman8,hz,idna,iso2022_jp,iso2022_jp_1,iso2022_jp_2,iso2022_jp_2004,iso2022_jp_3,iso2022_jp_ext,iso2022_kr,iso8859_1,iso8859_10,iso8859_11,iso8859_13,iso8859_14,iso8859_15,iso8859_16,iso8859_2,iso8859_3,iso8859_4,iso8859_5,iso8859_6,iso8859_7,iso8859_8,iso8859_9,johab,koi8_r,koi8_u,latin_1,mac_arabic,mac_centeuro,mac_croatian,mac_cyrillic,mac_farsi,mac_greek,mac_iceland,mac_latin2,mac_roman,mac_romanian,mac_turkish,mbcs,palmos,ptcp154,punycode,quopri_codec,raw_unicode_escape,rot_13,shift_jis,shift_jis_2004,shift_jisx0213,string_escape,tactis,tis_620,undefined,unicode_escape,unicode_internal,utf_16,utf_16_be,utf_16_le,utf_32,utf_32_be,utf_32_le,utf_7,utf_8,utf_8_sig,uu_codec,zlib_codec}, --encoding {aliases,ascii,base64_codec,big5,big5hkscs,bz2_codec,charmap,cp037,cp1006,cp1026,cp1140,cp1250,cp1251,cp1252,cp1253,cp1254,cp1255,cp1256,cp1257,cp1258,cp424,cp437,cp500,cp720,cp737,cp775,cp850,cp852,cp855,cp856,cp857,cp858,cp860,cp861,cp862,cp863,cp864,cp865,cp866,cp869,cp874,cp875,cp932,cp949,cp950,euc_jis_2004,euc_jisx0213,euc_jp,euc_kr,gb18030,gb2312,gbk,hex_codec,hp_roman8,hz,idna,iso2022_jp,iso2022_jp_1,iso2022_jp_2,iso2022_jp_2004,iso2022_jp_3,iso2022_jp_ext,iso2022_kr,iso8859_1,iso8859_10,iso8859_11,iso8859_13,iso8859_14,iso8859_15,iso8859_16,iso8859_2,iso8859_3,iso8859_4,iso8859_5,iso8859_6,iso8859_7,iso8859_8,iso8859_9,johab,koi8_r,koi8_u,latin_1,mac_arabic,mac_centeuro,mac_croatian,mac_cyrillic,mac_farsi,mac_greek,mac_iceland,mac_latin2,mac_roman,mac_romanian,mac_turkish,mbcs,palmos,ptcp154,punycode,quopri_codec,raw_unicode_escape,rot_13,shift_jis,shift_jis_2004,shift_jisx0213,string_escape,tactis,tis_620,undefined,unicode_escape,unicode_internal,utf_16,utf_16_be,utf_16_le,utf_32,utf_32_be,utf_32_le,utf_7,utf_8,utf_8_sig,uu_codec,zlib_codec}
Specify the encoding of the output.
--extension {.csv,.doc,.docx,.eml,.epub,.gif,.htm,.html,.jpeg,.jpg,.json,.log,.mp3,.msg,.odt,.ogg,.pdf,.png,.pptx,.ps,.psv,.rtf,.tff,.tif,.tiff,.tsv,.txt,.wav,.xls,.xlsx,csv,doc,docx,eml,epub,gif,htm,html,jpeg,jpg,json,log,mp3,msg,odt,ogg,pdf,png,pptx,ps,psv,rtf,tff,tif,tiff,tsv,txt,wav,xls,xlsx}
Specify the extension of the file.
-m METHOD, --method METHOD
Specify a method of extraction for formats that
support it
-o OUTPUT, --output OUTPUT
Output raw text in this file
-O OPTION, --option OPTION
Add arbitrary options to various parsers of the form
KEYWORD=VALUE. A full list of available KEYWORD
options is available at http://bit.ly/textract-options
-v, --version         show program's version number and exit


## pandoc flags help

[email protected]:~\$ pandoc --help
pandoc [OPTIONS] [FILES]
-f FORMAT, -r FORMAT  --from=FORMAT, --read=FORMAT
-t FORMAT, -w FORMAT  --to=FORMAT, --write=FORMAT
-o FILENAME           --output=FILENAME
--data-dir=DIRECTORY
-R                    --parse-raw
-S                    --smart
--old-dashes
--indented-code-classes=STRING
-F PROGRAM            --filter=PROGRAM
--normalize
-p                    --preserve-tabs
--tab-stop=NUMBER
--track-changes=accept|reject|all
--file-scope
--extract-media=PATH
-s                    --standalone
--template=FILENAME
-V KEY[:VALUE]        --variable=KEY[:VALUE]
-D FORMAT             --print-default-template=FORMAT
--print-default-data-file=FILE
--dpi=NUMBER
--no-wrap
--wrap=auto|none|preserve
--columns=NUMBER
--toc, --table-of-contents
--toc-depth=NUMBER
--no-highlight
--highlight-style=STYLE
-B FILENAME           --include-before-body=FILENAME
-A FILENAME           --include-after-body=FILENAME
--self-contained
--html-q-tags
--ascii
--reference-location=block|section|document
--chapters
--top-level-division=section|chapter|part
-N                    --number-sections
--number-offset=NUMBERS
--no-tex-ligatures
--listings
-i                    --incremental
--slide-level=NUMBER
--section-divs
--default-image-extension=extension
--email-obfuscation=none|javascript|references
--id-prefix=STRING
-T STRING             --title-prefix=STRING
-c URL                --css=URL
--reference-odt=FILENAME
--reference-docx=FILENAME
--epub-stylesheet=FILENAME
--epub-cover-image=FILENAME
--epub-embed-font=FILE
--epub-chapter-level=NUMBER
--latex-engine=PROGRAM
--latex-engine-opt=STRING
--bibliography=FILE
--csl=FILE
--citation-abbreviations=FILE
--natbib
--biblatex
-m[URL]               --latexmathml[=URL], --asciimathml[=URL]
--mathml[=URL]
--mimetex[=URL]
--webtex[=URL]
--jsmath[=URL]
--mathjax[=URL]
--katex[=URL]
--katex-stylesheet=URL
--trace
--dump-args
--ignore-args
--verbose
--bash-completion
--list-input-formats
--list-output-formats
--list-extensions
--list-highlight-languages
--list-highlight-styles
-v                    --version
-h                    --help

## jpegoptim Flags

 jpegoptim -help jpegoptim v1.4.4 Copyright (c) 1996-2016, Timo Kokkonen Usage: jpegoptim [options] 

-d, --dest= specify alternative destination directory for
optimized files (default is to overwrite originals)
-f, --force force optimization
-h, --help display this help and exit
-m, --max=
set maximum image quality factor (disables lossless
optimization mode, which is by default on)
Valid quality values: 0 - 100
-n, --noaction don't really optimize files, just print results
-S, --size=
Try to optimize file to given size (disables lossless
optimization mode). Target size is specified either in
kilo bytes (1 - n) or as percentage (1% - 99%)
-T, --threshold= keep old file if the gain is below a threshold (%)
-b, --csv print progress info in CSV format
-o, --overwrite overwrite target file even if it exists (meaningful
only when used with -d, --dest option)
-p, --preserve preserve file timestamps
-P, --preserve-perms
preserve original file permissions by overwriting it
-q, --quiet quiet mode
-t, --totals print totals after processing all files
-v, --verbose enable verbose mode (positively chatty)
-V, --version print program version

-s, --strip-all strip all markers from output file
--strip-none do not strip any markers
--strip-com strip Comment markers from output file
--strip-exif strip Exif markers from output file
--strip-iptc strip IPTC/Photoshop (APP13) markers from output file
--strip-icc strip ICC profile markers from output file
--strip-xmp strip XMP markers markers from output file

--all-normal force all output files to be non-progressive
--all-progressive force all output files to be progressive
--stdout send output to standard output (instead of a file)
--stdin read input from standard input (instead of a file)