PDF output support #11

Open
opened 2022-11-26 15:36:01 +00:00 by zyxw59 · 0 comments
zyxw59 commented 2022-11-26 15:36:01 +00:00 (Migrated from github.com)

SVG is nice for its simplicity, but PDF is the gold standard for transit maps. Also there don't appear to be any SVG converter tools that support all the features we use (CSS styling, dominant-baseline attribute).

Some challenges:

  • PDF/postscript doesn't have circular arcs, just cubic bézier curves
  • PDF requires embedding fonts in the document (I think; it might be possible to not include them, but that reduces portability)
  • PDF requires embedding any styling in the document. This requires us to either parse the CSS, or provide some way of encoding styling that is readable by the program.

https://docs.rs/pdf-writer/0.6.0/pdf_writer/ is probably useful.

SVG is nice for its simplicity, but PDF is the gold standard for transit maps. Also there don't appear to be any SVG converter tools that support all the features we use (CSS styling, `dominant-baseline` attribute). Some challenges: - PDF/postscript doesn't have circular arcs, just cubic bézier curves - PDF requires embedding fonts in the document (I think; it might be possible to not include them, but that reduces portability) - PDF requires embedding any styling in the document. This requires us to either parse the CSS, or provide some way of encoding styling that is readable by the program. https://docs.rs/pdf-writer/0.6.0/pdf_writer/ is probably useful.
Sign in to join this conversation.
No description provided.