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

Use intrinsic image resolution in PDF #329

Open
tgraham-antenna opened this issue May 21, 2023 · 6 comments
Open

Use intrinsic image resolution in PDF #329

tgraham-antenna opened this issue May 21, 2023 · 6 comments

Comments

@tgraham-antenna
Copy link
Contributor

Antenna House Formatter implements image-resolution from the last GCPM WD that had it:

Prince implements image-resolution with different syntax but also supports -prince-image-resolution:

@ndw
Copy link
Contributor

ndw commented May 23, 2023

I'm not sure what you're suggesting. Are you proposing image-resolution: from-image, or something else?

@tgraham-antenna
Copy link
Contributor Author

Assuming that there's a parameter to enable using intrinsic resolution (plus a parameter for fallback resolution), enabling it would include something like this in the CSS:

  -prince-image-resolution: auto, var(--fallback-resolution);
  -ah-image-resolution: from-image var(--falback-resolution);
  image-resolution: from-image var(--fallback-resolution);

@tgraham-antenna
Copy link
Contributor Author

Actually, using intrinsic resolution and what override/fallback resolution to use could be separate decisions for every image. Not sure how you'd manage that.

@ndw
Copy link
Contributor

ndw commented May 23, 2023

Is the absence of these properties causing formatting issues?

@tgraham-antenna
Copy link
Contributor Author

Not for me, but only because I have the Antenna House Formatter property in my local CSS.

Images for print typically have a higher resolution than do images for the screen. Images meant for high resolution output that are rendered at 96dpi take up too much space and, for the part that fits on the page, look too grainy.

I regularly edit screenshots to be, say, 150dpi or 200dpi so that they don't take up too much space and so that they have a consistent scale, rather than larger screenshots being arbitrarily scaled down to fit the width of a page.

@ndw
Copy link
Contributor

ndw commented Jun 2, 2023

What would a reasonable value be for the intrinsic and fallback resolutions?

I've worked out a method for adding style attributes to arbitrary elements.

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

2 participants