Change print quality in C#

Asked

Viewed 135 times

1

I am creating a program in which at a certain point it needs to print a budget...

using(PrintDocument print = new PrintDocument())
using(PrintPreviewDialog dialog = new PrintPreviewDialog())
{
    print.PrintPage += Print_PrintPage;
    dialog.Document = print;
    dialog.ShowDialog();
}

The problem is that it always prints in high quality, delaying in printing and spending much more ink than necessary.

How do I decrease print quality as well as other programs? Opção do Paint

  • Include your code instead of print and include the snippet of the command you are printing.

  • From what I’ve searched above, this Eventhandler "Printpage" has a property: Defaultpagesettings.PrinterResolution.Kind

  • thank you very much, ended up solving the problem.

  • 1

    @Joinvillecar check if my edits are correct and check the answer that solved your problem.

  • @Leandroangelo thanks for the correction, it’s the first time I use the site.

1 answer

2


Try using the Eventhandler Printpage Kind property.

using(PrintDocument print = new PrintDocument())
using(PrintPreviewDialog dialog = new PrintPreviewDialog())
{
    print.PrintPage += Print_PrintPage;

    //Declara a qualidade pré-definida para a impressão
    print.DefaultPageSettings.PrinterResolution.Kind = PrinterResolution.Low;

    dialog.Document = print;
    dialog.ShowDialog();
}

source

  • 2

    @Mbertolazo Avoid giving the answer only with the source link, based on the comments and confirmation of the author of the question I edited your post to submit the answer.

  • Thanks a lot @Leandroangelo, Noted.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.