Kozea / CairoSVG

Convert your vector images
https://courtbouillon.org/cairosvg
GNU Lesser General Public License v3.0
763 stars 150 forks source link

A Switch to Set Page Scaling to None #35

Closed H--W closed 11 years ago

H--W commented 11 years ago

PDF 1.6 has an option to specify that the page scaling can be set to None. In some cases this would eliminate the need for users to modify default print settings in order to prevent the printer from shrinking the PDF and adding margins. For example, the switch --noscaling would cause cairosvg to add the required option/property. I have no idea how hard this would be, or even if it's possible. But if you could, this would be extremely useful to me (and anyone designing forms etc which must be printed without scaling).

SimonSapin commented 11 years ago

I believe that cairo does not support setting this, but if it’s not buried too deep in the PDF file format CairoSVG could have a PDF post-processing step like WeasyPrint does. (To me this is just another sign that CarioSVG and WeasyPrint should be one and the same project, but eh :) )

liZe commented 11 years ago

For me, it's just another sign that we should have a real library to edit PDFs :).

By the way, even if we had, we won't include an option for each PDF feature in CairoSVG. You should try to look at other libraries such as reportlab, you may find what you're looking for.