Evidlo / remarkable_printer

Native printing to reMarkable.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't send PDF's with PDF version 1.4 to remarkable

dansbandit opened this issue · comments

Browser: Chromium
OS: Linux

Printing with Chromium https://github.com/Evidlo/remarkable_printer gives an error.

Steps to reproduce

  1. Print to reMarkable in Chromium (Print to PDF and use pdfinfo to verify that your browser creates PDF with PDF version 1.4)
reMarkable: ~/ ./printer.arm -host 0.0.0.0 -port 9100 -debug -restart  
Saving PDF to /home/root/.local/share/remarkable/xochitl/10376b64-c106-43d2-a1af-3cbfbc702c94.pdf
[%PDF-1.4
]
[PDF begin]
[Invalid PDF]

Workaround

  1. Save to PDF in Chromium
  2. Convert PDF to PDF version 1.6 $ gs -q -sDEVICE=pdfwrite -dCompatibilityLevel=1.6 -o Evidlo_remarkable_printer_\ Native\ printing\ to\ reMarkable_V1.6.pdf Evidlo_remarkable_printer_\ Native\ printing\ to\ reMarkable_.pdf
  3. Send with lp
reMarkable: ~/ ./printer.arm -host 0.0.0.0 -port 9100 -debug -restart                                                                                                               
Listening on 0.0.0.0:9100
Saving PDF to /home/root/.local/share/remarkable/xochitl/ae491792-439c-466d-8d4b-34eb3c15ee9e.pdf
[%PDF-1.6
]
[PDF begin]
Saving metadata to /home/root/.local/share/remarkable/xochitl/ae491792-439c-466d-8d4b-34eb3c15ee9e.metadata```

This should be fixed with the latest release.

The problem wasn't actually the version number, but the fact that the code assumed the last line of the PDF ends with a newline, which Chrome doesn't do.

Thanks for the quick reply and fix! It now works as expected.

Thanks again for creating this software!