Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Question: Is there a way to set the magnification? #692
No, but I think that it's possible using WeasyPrint's Python API … and some PDF knowledge. If you' have some PDF skills, the next paragraph may be useful. If you're not, then, you can skip them
(According to the PDF spec, we have to add a "OpenAction" destination in the PDF's catalog, leading to the first page with the "/FitV" option.)
If you're not afraid of using WeasyPrint's API, I can try to write a small demo sample, or even give you some hints so that you can write it yourself!
Adding an option working out-of-the-box may be useful, but the hard part is to find a clean API for this, as there's a lot of different options.
Thank you for the explanation! It was so good, I was able to make it work :-)
I found no reference to the catalog in the v0.42.3 API, so I had to switch to the current master.
Here is a piece of code for other people who might read the issue and want to do the same:
I keep the issue open as we should give this example in the documentation.