Giter VIP home page Giter VIP logo

pdf_snipper's Introduction

PDF Snipper

PDF Snipper is not only a snipper. It is a command-line tool that offers a range of features for manipulating PDF files. The tool was initially designed to extract a range of pages from a PDF file and save them as a new file, but it is becoming a tool box. You can call it PDF commander. The tool allows users to extract a range of pages from a PDF file, merge multiple PDF files into one, bookmark operations, and more.

Installation

To install PDF Snipper, see the install.sh file.

Usage

PDF Snipper offers the following command-line options:

Snipper

Extracts a range of pages from a PDF file and saves them as a new file.

python pdf_snipper snipper [-h] [-s START_PAGE] [-e END_PAGE] [-i PDF_FILE] [-o OUTPUT_FILE] [-p PAGES [PAGES ...]]

Arguments:

  • -s, --start_page: Starting page number to extract (inclusive).
  • -e, --end_page: Ending page number to extract (inclusive).
  • -i, --input: Path to the input PDF file.
  • -o, --output: Path to the output PDF file. If not specified, the output file will be saved in the same directory as the input file with a filename based on the start and end page numbers.
  • -p, --pages: List of page numbers to extract.

Merge

Merges multiple PDF files into one PDF file.

python pdf_snipper merge [-h] -i INPUT_FILES [INPUT_FILES ...] [-o OUTPUT_FILE]

Arguments:

  • -i, --input: List of paths to the input PDF files.
  • -o, --output: Path to the output PDF file.

Bookmark

Bookmark operations

python pdf_snipper bookmark [-h] [-i PDF_FILE] [-o OUTPUT_FILE] [-m] [-M MAX_LEVEL]

Arguments:

  • -i, --input: Path to the input PDF file.
  • -o, --output: Path to the output PDF file. Base now, this flag can be ignored.
  • -m, --bookmark: Flag to read bookmarks.
  • -M, --max_level: Maximum bookmark level.

Run pdf_snipper -h to see more information about each command.

Additional Features

PDF Snipper can be extended to include additional features, such as:

  1. Split by bookmark: allow users to split a PDF file into multiple files based on its bookmarks.
  2. Rotate pages: allow users to rotate pages in a PDF file.
  3. Add watermarks: allow users to add watermarks to a PDF file.
  4. Extract text: allow users to extract text from a PDF file.
  5. OCR: use optical character recognition (OCR) to recognize text in scanned PDFs.
  6. Command-line options for more customization: add more command-line options to allow users to customize the output file name, page size, and other properties.
  7. Format convertor: Convert files in other formats to PDF files.

License

PDF Snipper is licensed under the MIT license. See the LICENSE file for more information.

pdf_snipper's People

Contributors

devruibin avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.