Merge individual pages of PDF file into one page
Project description
PyPDFMerge
Merge individual pages of PDF file into one page
Demo
Merging 2 pages into 1
Before | After |
---|---|
Installation
pip install PyPDFMerge
NOTE: You need visual studio build tools for C++ to install PyPDFMerge
package. Refer to this for more information.
Usage
Command Line
You can use PyPDFMerge
command to merge pdf files. It has following options:
pdfmerger <path> [-o <output>] [-g <group_size>] [-q <quality>]
Example:
pdfmerger test.pdf
This will merge test.pdf
file and save it as output.pdf
in the same directory.
NOTE: Output defaults to output.pdf
, group size defaults to 2
and quality defaults to 1.5
.
Python
You can also use PyPDFMerge
package in your python code. It has following options:
from pdfmerger import PDFMerge
pdf = PDFMerge(pdf_file=<path>, output_file=<output>, group_size=<group_size>, quality=<quality>, page_number=<page_number>)
pdf.run()
Example:
from pdfmerger import PDFMerge
pdf = PDFMerge(pdf_file="./test.pdf", output_file="./output.pdf", group_size=2, quality=1.5)
pdf.run()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
PyPDFMerge-0.0.1.tar.gz
(5.9 kB
view hashes)
Built Distribution
Close
Hashes for PyPDFMerge-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1d0ed3725797f009d77ddf9bfb9ecdbc350c5c918ebc735e35db27a1ce5bae4 |
|
MD5 | 4af7b360cd240d40641501ac81f94e29 |
|
BLAKE2b-256 | e2b165de96ec4f58612a8f98df37bb4d8a722014b007b43dcc2ab91cfc3e579d |