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

PDF Page Resolution #248

Closed
gsg-chris opened this issue Apr 23, 2015 · 5 comments
Closed

PDF Page Resolution #248

gsg-chris opened this issue Apr 23, 2015 · 5 comments

Comments

@gsg-chris
Copy link

We are trying to generate print quality (300 dpi) documents html-to-pdf. Because the pages are 96dpi, the images are too large. In other html-to-pdf converters (in php) you can set the default page resolution in a config file to 300dpi. Because we are using Python, we are using Weasyprint.

Is there something we can do to ensure the image quality is 300dpi? Do you have any recommendations?

@SimonSapin
Copy link
Member

You’re probably looking for the image-resolution property: img { image-resolution: 300dpi }. Alternatively, set the width or height property to a non-auto value to size images explicitly.

@SimonSapin
Copy link
Member

By the way, the things that WeasyPrint supports are listed in http://weasyprint.org/docs/features/

@liZe
Copy link
Member

liZe commented Apr 29, 2015

@pdx971 Did this property solve your problem?

@liZe liZe closed this as completed Aug 14, 2015
@davidkjoy
Copy link

You’re probably looking for the image-resolution property: img { image-resolution: 300dpi }. Alternatively, set the width or height property to a non-auto value to size images explicitly.

I can't figure out how to use it. Could you please specify how to use it .

@SimonSapin
Copy link
Member

img { image-resolution: 300dpi } is a CSS rule, to be included in your stylesheet, that sets the image-resolution property to a value of three hundreds "dots-per-inch" (image pixels per CSS in unit, with 1in = 96px) for every <img> element in your HTML document.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants