Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for red and blue pens #16

Open
myersjustinc opened this issue Mar 29, 2022 · 1 comment
Open

Add support for red and blue pens #16

myersjustinc opened this issue Mar 29, 2022 · 1 comment

Comments

@myersjustinc
Copy link

v2.11 added support for two more pen colors (red and blue): https://support.remarkable.com/hc/en-us/articles/4413620362897-Software-release-2-11#article-heading-1

(The fork @naturale0 mentions in #12 (comment) includes support for these.)

As-is, I get the following error when I try to use 89b5cc3 on a document where I've drawn in red or blue:

$ python -m rmrl 'Quick reference.zip' 'Quick reference.pdf'
Traceback (most recent call last):
  File "/Users/jmyers/.pyenv/versions/3.9.6/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Users/jmyers/.pyenv/versions/3.9.6/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/Users/jmyers/wtf/rm-todos/rmrl/src/rmrl/rmrl/__main__.py", line 53, in <module>
    sys.exit(main())
  File "/Users/jmyers/wtf/rm-todos/rmrl/src/rmrl/rmrl/__main__.py", line 44, in main
    stream = render(source,
  File "/Users/jmyers/wtf/rm-todos/rmrl/src/rmrl/rmrl/render.py", line 95, in render
    page.render_to_painter(pdf_canvas, vector, template_alpha)
  File "/Users/jmyers/wtf/rm-todos/rmrl/src/rmrl/rmrl/document.py", line 148, in render_to_painter
    layer.render_to_painter(canvas, vector)
  File "/Users/jmyers/wtf/rm-todos/rmrl/src/rmrl/rmrl/document.py", line 245, in render_to_painter
    self.paint_strokes(painter, vector=vector)
  File "/Users/jmyers/wtf/rm-todos/rmrl/src/rmrl/rmrl/document.py", line 238, in paint_strokes
    color=self.colors[color])
IndexError: list index out of range
@lckarssen
Copy link

lckarssen commented Apr 3, 2022

Have a look in my fork or the one from @naturale0 who started the work. For me this worked (you can set the colours to whatever you want).

Edit: Oops, I just see you already mention @naturale0...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants