Package: pdftowrite
pdftowrite: Annotate PDFs with Stylus Labs WriteA utility that converts PDF toStylus Labs Writedocument, and vice versa.Annotate PDFsThere are two ways to annotate PDFs.A. Convert PDF -> SVG -> PDF (literally)pdftowrite example.pdf: Convert *.pdf to *.svgz(Openexample.svgzwith Stylus Labs Write and write your notes)writetopdf example.svgz -o example-annot.pdf: Convert *.svgz to *.pdfpdftowriteconverts PDF pages to SVG paths with invisible but selectable text
layers, so you can preserve text as selectable characters.You should usewritetopdfinstead of Write's PDF exporter which does not
support some features (e.g. Unicode text, multi-coords tspans, etc.).The result PDF (excluding annotations) is, however, not 100% the same as the
original PDF. This is because:PDF and SVG are not 100% compatibleWrite does not support entire SVG spec, so some modifications are required for compatibility with WriteOriginal text elements are deleted. Instead, a text layer is added to the page as mentioned earlierB. Annotation modepdftowrite example.pdf: Convert *.pdf to *.svgz(Openexample.svgzwith Stylus Labs Write and write your notes)writetopdf --annot example.svgz -o example-annot.pdf: New PDF = Original PDF + AnnotationsYou can see that--annotoption is added in3. If the option is added,writetopdfcreates a new PDF by overlaying annotations on top of the original
PDF pages. This is similar to Xournal's method.You can annotate different PDF file with--pdf-file FILEoption. e.g.:writetopdf --annot --pdf-file example2.pdf example.svgz -o example2-annot.pdfInstallpip install --user pdftowriteRequirementspdftowrite:Poppler (pdfinfo)Inkscape (either native or flatpak)ImageMagick (convert)gziplxml (libxml2, libxslt)writetopdf:wkhtmltopdfPDFtk(pdftk-java)librsvg (rsvg-convert)gzipYou need to manually install the packages. e.g.:Debian/Ubuntu:sudo apt install poppler-utils inkscape imagemagick gzip libxml2-dev libxslt-dev wkhtmltopdf pdftk librsvg2-binFedora:sudo dnf install poppler inkscape ImageMagick gzip libxml2-devel libxslt-devel wkhtmltopdf pdftk librsvg2-toolsArch:sudo pacman -S poppler inkscape imagemagick gzip libxslt wkhtmltopdf pdftk librsvgUsagepdftowriteusage: pdftowrite [-h] [-v] [-o OUTPUT] [-f] [-m {mixed,poppler,inkscape}]
                  [-C] [-d DPI] [-g PAGES] [-u NODUP_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
  -v, --version         show program's version number and exit
  -o OUTPUT, --output OUTPUT
                        Specify output filename
  -f, --force           Overwrite existing files without asking
  -m {mixed,poppler,inkscape}, --mode {mixed,poppler,inkscape}
                        Specify render mode (default: mixed)
  -C, --no-compat-mode  Turn off Write compatibility mode
  -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)
  -u NODUP_PAGES, --nodup-pages NODUP_PAGES
                        Specify no-dup pages (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)writetopdfusage: writetopdf [-h] [-v] [--annot] [--pdf-file PDF_FILE] [-o OUTPUT] [-f]
                  [-g PAGES] [-s SCALE]
                  FILE

Convert Stylus Labs Write document to PDF

positional arguments:
  FILE                  A Write document

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  --annot               Use annotation mode
  --pdf-file PDF_FILE   Specify the PDF file to be annotated
  -o OUTPUT, --output OUTPUT
                        Specify output filename
  -f, --force           Overwrite existing files without asking
  -g PAGES, --pages PAGES
                        Specify pages to convert (e.g. "1 2 3", "1-3")
                        (default: all)
  -s SCALE, --scale SCALE
                        Scale page size (default: 1.0)