- Overview
- Requirements
- Supported Actions
- Supported Options
- Example Usage
- Value Constraints
- Usage Synopsis
- Options and Examples
- Execution Assurance
- Notes
- Authors and Contributors
pdf-tool
(version 1.0.2) is a versatile Linux command-line utility designed to manipulate PDF files. With pdf-tool
, you can
perform a wide range of actions such as compressing, rotating, numbering, concatenating, extracting, including,
excluding, encrypting, decrypting, bursting, stamping, getting info ... on PDF files.
Once the package is installed, you can use the alias pdftool
instead of pdf-tool
.
To install the PDF file, follow these steps:
- Clone the repository
Run the following command to clone the repository with the specified branch:git clone --depth 1 --branch v1.0.2-maimouna https://github.com/baldeuniversel/pdf-tool.git
- Install the package
Once the repository is cloned, install the package using the following command:sudo dpkg --install pdf-tool/package/deb/pdf-tool-1.0.2.deb
- Install the dependencies if necessary (optional/requirement)
If you useapt
as package managersudo apt install -f
The following actions are supported by pdf-tool
:
--extract
--number
--concat
--compress
--rotate
--include
--exclude
--stamp
--burst
--encrypt
--decrypt
--info
--doc
--help
--version
These are the options that can be used with the actions:
--input
or-i
--from
or-f
--to
or-t
--source
or-s
--destination
or-d
--after-page
or-a
--level
or-l
--cardinal
or-c
--scope
or-s
--output
or-o
Note: When executing an action, at least one option must be provided (except for --help
, --doc
, and --version
).
pdf-tool --extract --input <pdf-file.pdf> --from 1 --to 2 --output <new-pdf.pdf>
- Positive Integers: Options like
--from
,--to
,--level
, and--after-page
require a positive integer as a value. - String Values: Options like
--cardinal
and--scope
require string values. - PDF Files: Options like
--input
,--source
, and--destination
require valid PDF file paths.
Note: For the --concat
action, multiple PDF files can be provided as inputs.
pdf-tool [action] || [action] [option] [argument(s)] [option] [argument(s)]
Extract pages from a PDF file.
pdf-tool --extract --input <pdf-file.pdf> --from 1 --to 2 --output <new-pdf.pdf>
Add page numbers to a PDF.
pdf-tool --number --input <pdf-file.pdf> --output <new-pdf.pdf>
Concatenate multiple PDF files.
pdf-tool --concat --input <pdf-file1.pdf> <pdf-file2.pdf> --output <new-pdf.pdf>
Compress a PDF file.
pdf-tool --compress --input <pdf-file1.pdf> --level 4 --output <new-pdf.pdf>
Rotate pages in a PDF file.
pdf-tool --rotate --input <pdf-file1.pdf> --cardinal east --output <new-pdf.pdf>
Include a PDF file into another.
pdf-tool --include --source <pdf-file1.pdf> --destination <pdf-file2.pdf> --after-page 2 --output <new-pdf.pdf>
Exclude specific pages from a PDF.
pdf-tool --exclude --input <pdf-file1.pdf> --from 3 --to 5 --output <new-pdf.pdf>
Stamp a PDF with a specific scope.
pdf-tool --stamp --input <pdf-file1.pdf> --scope confidential --output <new-pdf.pdf>
Burst a PDF file into individual pages.
pdf-tool --burst --input <pdf-file1.pdf> --output <new-template-name.pdf>
Encrypt a PDF file.
pdf-tool --encrypt --input <pdf-file.pdf> --output <new-pdf-encrypted.pdf>
Decrypt a PDF file.
pdf-tool --decrypt --input <pdf-file.pdf> --output <new-pdf-decrypted.pdf>
Get some info about an input PDF file.
pdf-tool --info --input <pdf-file.pdf>
View the documentation.
pdf-tool --doc
Get help on using pdf-tool
.
pdf-tool --help
Check the current version of pdf-tool
.
pdf-tool --version
To ensure successful execution, the command must follow the specified preconditions. Each action must be accompanied by the appropriate options and arguments in the correct sequence, as outlined above.
pdf-tool
depends on several external programs. These dependencies are included in the global package of pdf-tool
. Once an action like --encrypt
is called, the order of subsequent options is flexible.
Author:
Baldé Amadou ([email protected])
Contributor:
Diallo Ismaila ([email protected])
Learn how to install pdf-tool
.
This documentation aims to provide comprehensive guidance on using pdf-tool
effectively.
For any request, write to me via this email address : ([email protected])