Hash: SHA1

PDFTK also leaves the files unchanged, exactly as libreoffice does, another 
could be qpdf:

> andrew@a68n:~/Documents/SCAN$ qpdf --help
> Usage: qpdf [ options ] { infilename | --empty } [ outfilename ]
> An option summary appears below.  Please see the documentation for details.
> Note that when contradictory options are provided, whichever options are
> provided last take precedence.
> Basic Options
> -------------
> --password=password     specify a password for accessing encrypted files
> --linearize             generated a linearized (web optimized) file
> --copy-encryption=file  copy encryption parameters from specified file
> --encryption-file-password=password
>                         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
> 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.
> Encryption Options
> ------------------
>   --encrypt user-password owner-password key-length flags --
> 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
>     --cleartext-metadata     prevents encryption of metadata
>     --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 cleartext-metadata forces the PDF version to at least 1.5.
> 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.
> --pages file [ --password=password ] [ page-range ] ... --
> 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.  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.
> Advanced Transformation Options
> -------------------------------
> 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)
> --normalize-content=[yn]  enables or disables normalization of content streams
> --suppress-recovery       prevents qpdf from attempting to recover damaged 
> files
> --object-streams=mode     controls handing of object streams
> --ignore-xref-streams     tells qpdf to ignore any cross-reference streams
> --qdf                     turns on "QDF mode" (below)
> --min-version=version     sets the minimum PDF version of the output file
> --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
> means PDF version 1.7 at extension level 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
> 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.
> --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
> --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.

Or possibly a combination of some of the following tools:

> andrew@a68n:~/Documents/SCAN$ apropos pdf
> dvipdf (1)           - Convert TeX DVI file to PDF using ghostscript and dvips
> evince-thumbnailer (1) - create png thumbnails from PostScript and PDF 
> documents
> fig2mpdf (1)         - creation of multilayer pdf or eps figures from fig 
> files using
> latex for typesetting fix-qdf (1)          - repair PDF files in QDF form 
> after editing
> foomatic-ppdfile (1) - Generate a PPD file for a given printer/driver combo
> ghostscript (1)      - Ghostscript (PostScript and PDF language interpreter 
> and
> previewer) gs (1)               - Ghostscript (PostScript and PDF language 
> interpreter
> and previewer) gsnd (1)             - Run ghostscript (PostScript and PDF 
> engine)
> without display htdig-pdfparser (1)  - parse a PDF document (wrapper script 
> for htdig)
> Image::ExifTool::PDF (3pm) - Read PDF meta information
> Image::ExifTool::WritePDF (3pm) - Write PDF meta information
> Mail::SpamAssassin::Plugin::PDFInfo (3pm) - PDFInfo Plugin for SpamAssassin
> mupdf (1)            - MuPDF is a lightweight PDF viewer written in portable C
> mupdf-x11 (1)        - MuPDF is a lightweight PDF viewer written in portable C
> pdf-meta (1)         - read and write metadata from a PDF file
> pdf2dsc (1)          - generate a PostScript page list of a PDF document
> pdf2ps (1)           - Ghostscript PDF to PostScript translator
> pdfdetach (1)        - Portable Document Format (PDF) document embedded file 
> extractor
> (version 3.03) pdffonts (1)         - Portable Document Format (PDF) font 
> analyzer
> (version 3.03) pdfimages (1)        - Portable Document Format (PDF) image 
> extractor
> (version 3.03) pdfinfo (1)          - Portable Document Format (PDF) document
> information extractor (version 3.03) pdfopt (1)           - Ghostscript PDF 
> Optimizer
> pdfseparate (1)      - Portable Document Format (PDF) page extractor
> pdftexi2dvi (1)      - convert Texinfo documents to DVI or PDF
> pdftk (1)            - A handy tool for manipulating PDF
> pdftocairo (1)       - Portable Document Format (PDF) to 
> using cairo pdftohtml (1)        - program to convert PDF files into HTML, 
> XML and PNG
> images pdftoppm (1)         - Portable Document Format (PDF) to Portable 
> Pixmap (PPM)
> converter (version 3.03) pdftops (1)          - Portable Document Format 
> (PDF) to
> PostScript converter (version 3.03) pdftotext (1)        - Portable Document 
> Format
> (PDF) to text converter (version 3.03) pdfunite (1)         - Portable 
> Document Format
> (PDF) page merger ps2ascii (1)         - Ghostscript translator from 
> PostScript or PDF
> to ASCII ps2pdf (1)           - Convert PostScript to PDF using ghostscript
> ps2pdf12 (1)         - Convert PostScript to PDF 1.2 (Acrobat 3-and-later 
> compatible)
> using ghostscript ps2pdf13 (1)         - Convert PostScript to PDF 1.3 
> (Acrobat
> 4-and-later compatible) using ghostscript ps2pdf14 (1)         - Convert 
> PostScript to
> PDF 1.4 (Acrobat 5-and-later compatible) using ghostscript ps2pdfwr (1)       
>   -
> Convert PostScript to PDF without specifying CompatibilityLevel, using 
> ghostscript
> pstoedit (1)         - a tool converting PostScript and PDF files into 
> various vector
> graphic formats pstotext (1)         - extract ASCII text from a PostScript 
> or PDF file
> qpdf (1)             - PDF transformation software texi2dvi (1)         - 
> convert
> Texinfo documents to DVI or PDF texi2pdf (1)         - convert Texinfo 
> documents to DVI
> or PDF

Cannot go less mousey yet concerning this, it's kind of beyond my scope and too 
right now, I mean time-consuming, so currently there is no alternative to the
Version: GnuPG v2


Reply via email to