V4 printer driver - Issue with setting XPS image quality to PNG Lossless

Carlo Manasse 1 Reputation point
2021-12-21T17:22:09.057+00:00

Hi,
Based on the Microsoft v4 printer driver architecture, I am developing a custom render filter which requires an input XPS that embeds images with PNG lossless quality.
An unexpected behaviour affects Microsoft Paint application when printing an image via a v4 printer driver because the image quality setting used for the XPS generation is completely ignored.

As an example, the issue is shown by printing a file with XPS Document Writer Printer because the underlying architecture of a v4 printer driver entirely depends on XPS generation.

1 - Open an image with paint

159339-immagine.png

2 - Open the advanced settings and set the image quality to PNG – Lossless compression

159328-immagine.png

3 - Print the image to an xps file

159363-immagine.png

4 - Unzip the xps file

159347-immagine.png

5 - Browse inside the folder <xps_file>\Documents\1\Resources\Images

159348-immagine.png

The unpacked XPS shows that internally the image has been stored with JPG format in place of the PNG format selected in the advanced setting of the printer.

The resulting XPS file (on the right) clearly shows lower quality and blurred artifacts

159285-immagine.png

This behaviour has been tested on Windows 10 Operating System for x64 architecture. Note that the input image has a 24bit RGB color format.
It seems that different image formats show different outcomes, even though the quality setting always seems to be ignored.

In addition, I have tried to set the directive PageOutputQuality.[option]=MxdcImageType.PNG in my custom v4 printer driver manifest file (for all draft, normal, high options) as described here:
v4-driver-manifest
Also with these directives, the PNG image quality settings is ignored

Is there any workaround to force PNG lossless image quality in the resulting XPS file? Is this a well-known behaviour?

Many thanks for any answer

Windows for business | Windows Client for IT Pros | Devices and deployment | Other
Windows for business | Windows Server | User experience | Print jobs
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 39,926 Reputation points
    2021-12-24T19:49:25.377+00:00

    Hello

    I would recommend you to check this archived thread regarding the same issue, on how to define the quality of XPS printing:

    https://social.msdn.microsoft.com/Forums/en-US/6783db57-6c3a-44f5-b93a-0ec570ed43b4/xps-print-quality-and-artifacts?forum=windowsxps

    Hope this helps with your query,


    --If the reply is helpful, please Upvote and Accept as answer--

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.