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

Replace cairo #342

Closed
oz123 opened this issue Aug 12, 2016 · 7 comments
Closed

Replace cairo #342

oz123 opened this issue Aug 12, 2016 · 7 comments
Labels
feature New feature that should be supported
Milestone

Comments

@oz123
Copy link

oz123 commented Aug 12, 2016

I know it's a bit ambitious... but cairo does more than PDF, and that what makes it so complex and awesome. Maybe for WeasyPrint a small specialized library is enough?

https://github.com/rk700/PyMuPDF

@liZe
Copy link
Member

liZe commented Aug 12, 2016

This library looks cool, but it seems to be a PDF reader, not a PDF writer 😄.

It could be useful to solve #52 but it's released under GPL just like Poppler.

@oz123
Copy link
Author

oz123 commented Aug 12, 2016

You can definitely write PDF with MuPDF. Just the Python Binding wraps only the view functions.

@oz123
Copy link
Author

oz123 commented Aug 12, 2016

There is also https://github.com/pmaupin/pdfrw which is pure Python. The author says the following:

pdfrw will faithfully reproduce vector formats without rasterization, so the rst2pdf package has used pdfrw for PDF and SVG images by default since March 2010.

@oz123 oz123 changed the title suggestion: replace cairo with mupdf suggestion: replace cairo with X Aug 12, 2016
@liZe liZe changed the title suggestion: replace cairo with X Suggestion: replace cairo Aug 16, 2016
@liZe liZe added the feature New feature that should be supported label Aug 16, 2016
@oz123
Copy link
Author

oz123 commented Aug 17, 2016

One more interesting option which I could suggest is to reap off the matplotlib.backend_pdf for using as the basic canvas.
The code is really neat to look at, and I have been fooling around with to create A4 pages with text on them.

I am willing to collaborate on this too.

as a side note, I took over the maintenance of rst2pdf, which share a lot of functionality through xhtml2pdf with weasyprint, css parsing and other stuff for sure. Maybe some things can be joint projects.

@liZe liZe changed the title Suggestion: replace cairo Replace cairo Jul 25, 2019
@stuaxo
Copy link

stuaxo commented Dec 11, 2019

Changing itself cairo to split up it's backends could be fruitful (so you could install cairo, but only the pdf backend).

As mentioned in the #841 you then have Pango with its dependencies, and may want to do something similar there.

@liZe
Copy link
Member

liZe commented Oct 21, 2020

A lot of work has been done in the pydyf branch to remove Cairo, we’ll discuss this topic in #1232!

@liZe
Copy link
Member

liZe commented Apr 26, 2021

It’s done!

@liZe liZe closed this as completed Apr 26, 2021
@liZe liZe added this to the 53.0b1 milestone Apr 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature that should be supported
Projects
None yet
Development

No branches or pull requests

3 participants