abey79 / vpype

The Swiss-Army-knife command-line tool for plotter vector graphics.
https://vpype.readthedocs.io/
MIT License
699 stars 61 forks source link

Doesn't have support for outputting a2 to a0 paper sizes #143

Closed JoshuaMorris closed 3 years ago

JoshuaMorris commented 3 years ago

I was hoping to output some large paper sizes to plot.

the error messages were the same for paper sizes a2 to a0

Traceback (most recent call last):
  File "/usr/local/bin/vpype", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/vpype_cli/cli.py", line 74, in main
    return super().main(args=preprocess_argument_list(args), **extra)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1290, in invoke
    return _process_result(rv)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1224, in _process_result
    value = ctx.invoke(self.result_callback, value, **ctx.params)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/vpype_cli/cli.py", line 128, in process_pipeline
    execute_processors(processors)
  File "/usr/local/lib/python3.8/site-packages/vpype_cli/cli.py", line 212, in execute_processors
    state = proc(state)
  File "/usr/local/lib/python3.8/site-packages/vpype/decorators.py", line 150, in global_processor
    state.document = f(state.document, *args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/vpype_cli/write.py", line 199, in write
    page_size_px = convert_page_size(page_size)
  File "/usr/local/lib/python3.8/site-packages/vpype/utils.py", line 154, in convert_page_size
    raise ValueError(f"page size '{value}' unknown")
ValueError: page size 'a2' unknown
abey79 commented 3 years ago

@JoshuaMorris indeed for some reason I haven't added the larger page sizes. You can work around this by using the physical dimensions instead: vpype ... write --page-size 420x594mm ...(for A2).