-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Image filter functions: Always default to print-scaling=auto, ppi fix
If no image-scaling-related attribute (print-scaling, ppi, scaling, fit-to-page, fitplot, natural-scaling, fill, crop-to-fit) or an invalid value is assigned to print-scaling, we fall back to print-scaling=auto, meaning that we do not scale images small enough that they fit into the page and otherwise we scale down to fill the page for borderless printing and fit into the page if there are margins. Now also the ppi attribute works correctly, especially the image is never cropped with it. If the image is too large, it is distributed over several sheets, so ppi=100 and print-scaling=none are not the same. If the image is auto-rotated to fit the orientation of the output page, it is now always rotated in the printer's preferred direction, described by the landscape-orientation-requested-preferred printer IPP attribute, or if a PPD file is used via libppd, by the "*LandscapeOrientation: ..." keyword. If more than one image-scaling-related attribute is given, we only use one, the one which comes first in the priority order print-scaling, ppi, scaling, fit-to-page, fitplot, natural-scaling, fill, crop-to-fit. In addition, the calulations for the cropping of the image for print-scaling=none (crop-to-fit) and print-scaling=fill (fill page) got somewhat cleaned up.
- Loading branch information
1 parent
a13f48a
commit fbbb82a
Showing
2 changed files
with
252 additions
and
239 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.