A tool for PDF file manipulation.
Project description
🚀 PdfMod
🌟 Overview
PdfMod is a tool for manipulating PDF files, utilizing the pymupdf library. It enables reading and writing the table of contents, deleting pages, merging PDF files, and extracting pages. PdfMod facilitates the management and modification of PDF files according to your requirements.
📦 Dependencies
[!NOTE] PdfMod requires Python 3.7 or higher.
💻 Installation
To install PdfMod, run the following command in your terminal:
pip install pdfmod
🚀 Basic Usage
Reading a PDF's Table of Contents
To read a PDF file's table of contents and open it in a text editor, use the following command:
pdfmod toc read "D:\\如何提问.pdf" notepad
This command will extract the table of contents from the PDF file and open it in Notepad.
Writing to a PDF's Table of Contents
To write a table of contents to a PDF file, use the following command:
pdfmod toc write "D:\\如何提问.pdf" --bias=8
This command will write the table of contents to the PDF file with a bias of 8.
The --bias
option is used to adjust the position of the table of contents within the PDF file. A bias of 8 means that the table of contents will be shifted 8 units to the right from its default position. This can be useful for aligning the table of contents with the content of the PDF file.
Deleting Pages from a PDF
To delete pages from a PDF file, use the following command:
pdfmod delete "D:\\如何提问.pdf" 0 25
This command will delete pages 0 through 25 from the PDF file.
Joining PDF Files
To merge two PDF files, use the following command:
pdfmod join "D:\\如何提问_上半.pdf" "D:\\如何提问_下半.pdf"
This command will merge the two PDF files into a single PDF file.
Extracting Pages from a PDF
To extract pages from a PDF file and save them as a new PDF, use the following command:
pdfmod extract "D:\\如何提问.pdf" 0 25
This command will extract pages 0 through 25 from the PDF file and save them as a new PDF file.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pdfmod-0.1.5.tar.gz
.
File metadata
- Download URL: pdfmod-0.1.5.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59acd14d0a9ac8e3a0a17112118b5bc006d25d5604125fe81bf81c76406db463 |
|
MD5 | 67453e7127b0764c29a43fc1b8f036c2 |
|
BLAKE2b-256 | a4f672e0dc293b8dcff8e1e15826767628068059c95bdc4e36ceb09c77413a87 |
Provenance
The following attestation bundles were made for pdfmod-0.1.5.tar.gz
:
Publisher:
ci-cd.yml
on aoout/PdfMod
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
pdfmod-0.1.5.tar.gz
- Subject digest:
59acd14d0a9ac8e3a0a17112118b5bc006d25d5604125fe81bf81c76406db463
- Sigstore transparency entry: 148837130
- Sigstore integration time:
- Predicate type:
File details
Details for the file pdfmod-0.1.5-py3-none-any.whl
.
File metadata
- Download URL: pdfmod-0.1.5-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ab9fc589bf2d64c4e7fd9c03d9eac08199bcce06cde4a7436c92e7e0ee25bcc |
|
MD5 | d9664799a2c9a5eadfa4ecd2eaebbc95 |
|
BLAKE2b-256 | 5de23d01a33898ff9b38e2bd9b1050734493410395a7134b76c6fe609a0153f5 |
Provenance
The following attestation bundles were made for pdfmod-0.1.5-py3-none-any.whl
:
Publisher:
ci-cd.yml
on aoout/PdfMod
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
pdfmod-0.1.5-py3-none-any.whl
- Subject digest:
7ab9fc589bf2d64c4e7fd9c03d9eac08199bcce06cde4a7436c92e7e0ee25bcc
- Sigstore transparency entry: 148837131
- Sigstore integration time:
- Predicate type: