Skip to main content

A command line utility for easily modifying PDF files

Project description

Simple command line PDF editor

pdfriend is a simple command line program for editing PDF files at the page level (meaning it's able to manipulate pages, but not the content of said pages). It can, among other things:

  • merge many PDFs, PNGs and JPGs into a single PDF
  • split a PDF into different parts
  • rotate PDF pages
  • delete PDF pages
  • change the order of pages in a PDF
  • encrypt and decrypt PDFs
  • see and edit PDF metadata

Installation

The recommended way to install pdfriend is through pipx. Simply run:

pipx install pdfriend

You need a working python 3.11 or newer installation.

Alternatively, you can install it as you would any other PyPI package, for example using pip:

pip install pdfriend

Usage

To access instructions for the usage of pdfriend:

pdfriend help

As a quick overview:

Merging PDFs and images

PDFs:

pdfriend merge doc0.pdf doc1.pdf -o output.pdf

Images:

pdfriend merge img0.png img1.jpg img2.png img3.png -o output.pdf

PDFs and images:

pdfriend merge doc0.pdf img0.png doc32.pdf -o comb.pdf

Glob patterns are also supported:

pdfriend merge input_dir/*.png -o output.pdf

Editing PDFs

To edit a PDF file in place, enter the edit shell:

pdfriend edit doc.pdf

You can then use the edit subcommands, for example

rotate 12 90

To rotate page 12 by 90 degrees, or

delete 6

To delete page 6, or

swap 3 7

To swap pages 3 and 7, or

undo

To undo the previous command, etc. Use

help

To see all the available subcommands

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

pdfriend-0.5.0.tar.gz (25.4 kB view hashes)

Uploaded Source

Built Distribution

pdfriend-0.5.0-py3-none-any.whl (30.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page