{"id":30815419,"url":"https://github.com/apebl/pdftowrite","last_synced_at":"2025-09-06T08:13:18.529Z","repository":{"id":57451483,"uuid":"348704579","full_name":"apebl/pdftowrite","owner":"apebl","description":"Annotate PDFs with Stylus Labs Write","archived":false,"fork":false,"pushed_at":"2024-03-21T04:58:43.000Z","size":915,"stargazers_count":14,"open_issues_count":6,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-16T14:59:42.318Z","etag":null,"topics":["converter","pdf","stylus-labs-write","svg"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apebl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-17T12:39:32.000Z","updated_at":"2025-05-07T09:50:53.000Z","dependencies_parsed_at":"2024-08-10T09:29:53.899Z","dependency_job_id":"715b45f8-8cb8-4c5c-8925-31e6d86b2716","html_url":"https://github.com/apebl/pdftowrite","commit_stats":null,"previous_names":["apebl/pdftowrite","kosmospredanie/pdftowrite"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/apebl/pdftowrite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apebl%2Fpdftowrite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apebl%2Fpdftowrite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apebl%2Fpdftowrite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apebl%2Fpdftowrite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apebl","download_url":"https://codeload.github.com/apebl/pdftowrite/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apebl%2Fpdftowrite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273874160,"owners_count":25183368,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-06T02:00:13.247Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["converter","pdf","stylus-labs-write","svg"],"created_at":"2025-09-06T08:13:17.073Z","updated_at":"2025-09-06T08:13:18.520Z","avatar_url":"https://github.com/apebl.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pdftowrite: Annotate PDFs with Stylus Labs Write\n\n![](pdftowrite.png)\n\nA utility that converts PDF to [Stylus Labs Write](http://www.styluslabs.com/)\ndocument, and vice versa.\n\n## Annotate PDFs\n\nThere are two ways to annotate PDFs.\n\n### A. Convert PDF -\u003e SVG -\u003e PDF (literally)\n\n1. `pdftowrite example.pdf`: Convert *.pdf to *.svgz\n2. (Open `example.svgz` with Stylus Labs Write and write your notes)\n3. `writetopdf example.svgz -o example-annot.pdf`: Convert *.svgz to *.pdf\n\n`pdftowrite` converts PDF pages to SVG paths with invisible but selectable text\nlayers, so you can preserve text as selectable characters.\n\nYou should use `writetopdf` instead of Write's PDF exporter which does not\nsupport some features (e.g. Unicode text, multi-coords tspans, etc.).\n\nThe result PDF (excluding annotations) is, however, not 100% the same as the\noriginal PDF. This is because:\n\n- PDF and SVG are not 100% compatible\n- Write does not support entire SVG spec, so some modifications are required for compatibility with Write\n- Original text elements are deleted. Instead, a text layer is added to the page as mentioned earlier\n\n### B. Annotation mode\n\n1. `pdftowrite example.pdf`: Convert *.pdf to *.svgz\n2. (Open `example.svgz` with Stylus Labs Write and write your notes)\n3. `writetopdf --annot example.svgz -o example-annot.pdf`: New PDF = Original PDF + Annotations\n\nYou can see that `--annot` option is added in *3*. If the option is added,\n`writetopdf` creates a new PDF by overlaying annotations on top of the original\nPDF pages. This is similar to Xournal's method.\n\nYou can annotate different PDF file with `--pdf-file FILE` option. e.g.:\n\n```\nwritetopdf --annot --pdf-file example2.pdf example.svgz -o example2-annot.pdf\n```\n\n## Install\n\n```\npip install --user pdftowrite\n```\n\n### Requirements\n\n`pdftowrite`:\n\n * Poppler (`pdfinfo`)\n * Inkscape (either native or flatpak)\n * ImageMagick (`convert`)\n * gzip\n * lxml (libxml2, libxslt)\n\n`writetopdf`:\n\n * wkhtmltopdf\n * PDFtk(pdftk-java)\n * librsvg (`rsvg-convert`)\n * gzip\n\nYou need to manually install the packages. e.g.:\n\n- Debian/Ubuntu: `sudo apt install poppler-utils inkscape imagemagick gzip libxml2-dev libxslt-dev wkhtmltopdf pdftk librsvg2-bin`\n- Fedora: `sudo dnf install poppler inkscape ImageMagick gzip libxml2-devel libxslt-devel wkhtmltopdf pdftk librsvg2-tools`\n- Arch: `sudo pacman -S poppler inkscape imagemagick gzip libxslt wkhtmltopdf pdftk librsvg`\n\n## Usage\n\n### pdftowrite\n\n```\nusage: pdftowrite [-h] [-v] [-o OUTPUT] [-f] [-m {mixed,poppler,inkscape}]\n                  [-C] [-d DPI] [-g PAGES] [-u NODUP_PAGES] [-Z] [-s SCALE]\n                  [-x X] [-y Y] [-X XRULING] [-Y YRULING] [-l MARGIN_LEFT]\n                  [-p PAPERCOLOR] [-r RULECOLOR]\n                  FILE\n\nConvert PDF to Stylus Labs Write document\n\npositional arguments:\n  FILE                  A pdf file\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -v, --version         show program's version number and exit\n  -o OUTPUT, --output OUTPUT\n                        Specify output filename\n  -f, --force           Overwrite existing files without asking\n  -m {mixed,poppler,inkscape}, --mode {mixed,poppler,inkscape}\n                        Specify render mode (default: mixed)\n  -C, --no-compat-mode  Turn off Write compatibility mode\n  -d DPI, --dpi DPI     Specify resolution for bitmaps and rasterized filters\n                        (default: 96)\n  -g PAGES, --pages PAGES\n                        Specify pages to convert (e.g. \"1 2 3\", \"1-3\")\n                        (default: all)\n  -u NODUP_PAGES, --nodup-pages NODUP_PAGES\n                        Specify no-dup pages (e.g. \"1 2 3\", \"1-3\") (default:\n                        all)\n  -Z, --nozip           Do not compress output\n  -s SCALE, --scale SCALE\n                        Scale page size (default: 1.0)\n  -x X                  Specify the x coordinate of the viewport of \u003csvg\u003e\n                        (default: 10.0)\n  -y Y                  Specify the y coordinate of the viewport of \u003csvg\u003e\n                        (default: 10.0)\n  -X XRULING, --xruling XRULING\n                        Specify x rulling (default: 0.0)\n  -Y YRULING, --yruling YRULING\n                        Specify y rulling (default: 40.0)\n  -l MARGIN_LEFT, --margin-left MARGIN_LEFT\n                        Specify margin left (default: 100.0)\n  -p PAPERCOLOR, --papercolor PAPERCOLOR\n                        Specify paper color (default: #FFFFFF)\n  -r RULECOLOR, --rulecolor RULECOLOR\n                        Specify rule color (default: #9F0000FF)\n```\n\n### writetopdf\n\n```\nusage: writetopdf [-h] [-v] [--annot] [--pdf-file PDF_FILE] [-o OUTPUT] [-f]\n                  [-g PAGES] [-s SCALE]\n                  FILE\n\nConvert Stylus Labs Write document to PDF\n\npositional arguments:\n  FILE                  A Write document\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -v, --version         show program's version number and exit\n  --annot               Use annotation mode\n  --pdf-file PDF_FILE   Specify the PDF file to be annotated\n  -o OUTPUT, --output OUTPUT\n                        Specify output filename\n  -f, --force           Overwrite existing files without asking\n  -g PAGES, --pages PAGES\n                        Specify pages to convert (e.g. \"1 2 3\", \"1-3\")\n                        (default: all)\n  -s SCALE, --scale SCALE\n                        Scale page size (default: 1.0)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapebl%2Fpdftowrite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapebl%2Fpdftowrite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapebl%2Fpdftowrite/lists"}