🚀 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
💻 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.
Release files for pdfmod 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pdfmod-0.1.5.tar.gz | 2.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pdfmod-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.2 kB
Release files / pdfmod-0.1.5.tar.gz
| Download URL | pdfmod-0.1.5.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
59acd14d0a9ac8e3a0a17112118b5bc006d25d5604125fe81bf81c76406db463
|
|
BLAKE2b-256 checksum How to use checksums |
a4f672e0dc293b8dcff8e1e15826767628068059c95bdc4e36ceb09c77413a87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2024.
Transparency logRelease files / pdfmod-0.1.5-py3-none-any.whl
| Download URL | pdfmod-0.1.5-py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7ab9fc589bf2d64c4e7fd9c03d9eac08199bcce06cde4a7436c92e7e0ee25bcc
|
|
BLAKE2b-256 checksum How to use checksums |
5de23d01a33898ff9b38e2bd9b1050734493410395a7134b76c6fe609a0153f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2024.
Transparency log