Skip to main content

pdf2up

A small utility to generate preview images of research papers (e.g. arXiv) suitable for social media (e.g. Twitter)

Installation

To install as a command line tool pdf2up run:

pip install pdf2up

Usage

Run on the command line as pdf2up input.pdf, optionally with the following flags:

usage: pdf2up [-h] [-b BOX [BOX ...]] [--all] [-s SKIP] [-n N_UP] [-c CORES]
              input

positional arguments:
  input

optional arguments:
  -h, --help            show this help message and exit
  -b BOX [BOX ...], --box BOX [BOX ...]
                        to specify a crop box for each pre-cropped 2-up page
                        image, either as 1 side, 2 sides (L/R, T/B), or 4
                        sides (L, T, R, B)
  --all                 override the default of only producing 4 images (which
                        for default 2-up gives 8 pages as 4 PNGs)
  -s SKIP, --skip SKIP  How many pages to skip forward from the original PDF
  -n N_UP, --n-up N_UP  How many pages to 'paste' alongside onto a single page
                        (default: 2)
  -c CORES, --cores CORES
                        Maximum CPU cores to run multicore execution (default:
                        all available cores)

To run as a library using the pdf2up.conversion module:

  • The pdf2png() function gives the same interface as the CLI
  • The ConvertPdf2Png class gives access to values configured by this interface

Development

  • mypy: progressive (does not pass completely)
  • flake8: passing (flake8 . --max-line-length=88 --extend-ignore=E203,)

Metadata

Release files for pdf2up 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pdf2up 0.2.4
File Size Uploaded
pdf2up-0.2.4.tar.gz 8.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pdf2up 0.2.4
File Interpreter ABI Platform
pdf2up-0.2.4-py3-none-any.whl Python 3 none any Details

Total release size: 16.6 kB

Release files / pdf2up-0.2.4.tar.gz

Download URL pdf2up-0.2.4.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
562387103194829b65cab7e215aecbca951f7ed0ef1bba4f85679e403ca16f41
BLAKE2b-256 checksum
How to use checksums
15212e90f248ff72ea1087c6745372ed983bf41d5f67e1708f9c81e763af5ffb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.7

Release files / pdf2up-0.2.4-py3-none-any.whl

Download URL pdf2up-0.2.4-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cd0efb0389418454bca6be18276ecd6de7d9b237c39f79231d51d0c499aeecce
BLAKE2b-256 checksum
How to use checksums
4a2c81f7476c54117301cacd7a8f8eb1a032c02964d6e41b9cf85233701685b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.7

Release history Release notifications | RSS feed

This release

0.2.4 This release

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page