Skip to main content

PDF to Write document converter

Project description

pdftowrite

A utility that converts PDF to Stylus Labs Write document

How does it work

It converts PDF pages to SVG vector graphics and merges them into a Write document.

Render modes

There are two render modes:

  • poppler: The best quality, but losing text (default)
  • inkscape: Preserving text, but rendering results could be weird

Install

pip install --user pdftowrite

Requirements

  • Poppler
  • Inkscape (either native or flatpak)

Example

pdftowrite example.pdf

Usage

usage: pdftowrite [-h] [-o OUTPUT] [-m {poppler,inkscape}] [-d DPI] [-g PAGES]
                  [-Z] [-s SCALE] [-x X] [-y Y] [-X XRULING] [-Y YRULING]
                  [-l MARGIN_LEFT] [-p PAPERCOLOR] [-r RULECOLOR]
                  FILE

Convert PDF to Stylus Labs Write document

positional arguments:
  FILE                  A pdf file

optional arguments:
  -h, --help            show this help message and exit
  -o OUTPUT, --output OUTPUT
                        Specify output filename
  -m {poppler,inkscape}, --mode {poppler,inkscape}
                        Specify render mode (default: poppler)
  -d DPI, --dpi DPI     Specify resolution for bitmaps and rasterized filters
                        (default: 96)
  -g PAGES, --pages PAGES
                        Specify pages to convert (e.g. "1 2 3", "1-3")
                        (default: all)
  -Z, --nozip           Do not compress output
  -s SCALE, --scale SCALE
                        Scale page size (default: 1.0)
  -x X                  Specify the x coordinate of the viewport of <svg>
                        (default: 10.0)
  -y Y                  Specify the y coordinate of the viewport of <svg>
                        (default: 10.0)
  -X XRULING, --xruling XRULING
                        Specify x rulling (default: 0.0)
  -Y YRULING, --yruling YRULING
                        Specify y rulling (default: 40.0)
  -l MARGIN_LEFT, --margin-left MARGIN_LEFT
                        Specify margin left (default: 100.0)
  -p PAPERCOLOR, --papercolor PAPERCOLOR
                        Specify paper color (default: #FFFFFF)
  -r RULECOLOR, --rulecolor RULECOLOR
                        Specify rule color (default: #9F0000FF)

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

pdftowrite-2021.3.21.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

pdftowrite-2021.3.21-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file pdftowrite-2021.3.21.tar.gz.

File metadata

  • Download URL: pdftowrite-2021.3.21.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.1.2 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for pdftowrite-2021.3.21.tar.gz
Algorithm Hash digest
SHA256 b640766388b1bea40de61fa1c3c31a3867419ffc25ced51d1d4e586ac4fc1d47
MD5 a8abdcf1ee569596f9f2a9f5f7b9df8b
BLAKE2b-256 abe30f92699437631807fb0fa82ab7978457256cd3bb7b33d3858d49b547b066

See more details on using hashes here.

File details

Details for the file pdftowrite-2021.3.21-py3-none-any.whl.

File metadata

  • Download URL: pdftowrite-2021.3.21-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.1.2 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for pdftowrite-2021.3.21-py3-none-any.whl
Algorithm Hash digest
SHA256 4a3ad1a9b61659515b2db46e9725bc8b951709049c7fce5ac2aa77f88810394d
MD5 4ff0d9e10572a6fef579f0f431dd8893
BLAKE2b-256 006f6af26630059807a07f544051732c4e91ce424a2af6b97c1a332b6e1b1e1e

See more details on using hashes here.

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