Implement MultiBackend support for generating e.g. multi-page PDFs #18

Open
byorgey opened this Issue Oct 29, 2012 · 0 comments

Comments

Projects
None yet
1 participant
Owner

byorgey commented Oct 29, 2012

See https://github.com/diagrams/diagrams-core/blob/master/src/Diagrams/Core/Types.hs#L834 for the MultiBackend class.

Generating multiple pages can be done by calling

http://hackage.haskell.org/packages/archive/cairo/0.12.3.1/doc/html/Graphics-Rendering-Cairo.html#v:showPage

which is a binding to

http://www.cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-show-page

Multiple pages are supported for PDF, PS, and SVG. Not sure what should be done if the user calls renderDias but requests an output type that doesn't support it (PNG). Perhaps just exit with an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment