Skip to content

Print preview is not taking over the given print settings #8529

@neplan

Description

@neplan

Description

We have a .NET Framework 4.8 application. We are passing some settings to the print dialogue:

PrintDialog pd = new PrintDialog(); pd.PrintQueue = SelectedPrinter; if (Orientation == 0) pd.PrintTicket.PageOrientation = System.Printing.PageOrientation.Portrait; else pd.PrintTicket.PageOrientation = System.Printing.PageOrientation.Landscape; if (_setPageSize) { var paperSize = getPaperSize(); pd.PrintTicket.PageMediaSize = FindPageMediaSize(paperSize); pd.PrintTicket.PageResolution = new PageResolution(PageQualitativeResolution.High); }

This print settings are not applied to the Windows 11 print preview. Is there any workaround, fix or something we could do?

Reproduction Steps

Assing different print settings to the PrintDialog:
PrintDialog pd = new PrintDialog(); pd.PrintQueue = SelectedPrinter; if (Orientation == 0) pd.PrintTicket.PageOrientation = System.Printing.PageOrientation.Portrait; else pd.PrintTicket.PageOrientation = System.Printing.PageOrientation.Landscape; if (_setPageSize) { var paperSize = getPaperSize(); pd.PrintTicket.PageMediaSize = FindPageMediaSize(paperSize); pd.PrintTicket.PageResolution = new PageResolution(PageQualitativeResolution.High); }

Expected behavior

The print preview is taking over the settings given by our application

Actual behavior

All settings are ignored!

Regression?

No response

Known Workarounds

No response

Configuration

.NET 4.8
Windows 11

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    tenet-compatibilityIncompatibility with previous versions or with WPF for .NET Framework

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions