Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7798927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T00:08:40+00:00 2026-06-02T00:08:40+00:00

The Problem 1. Our customer has a networked printer that is configured to print

  • 0

The Problem
1. Our customer has a networked printer that is configured to print in Duplex (this cannot be changed).
2. We must print A4 sheets of labels to this printer but it must not be in Duplex mode as the labels go round the rollers and foul up.
3. When we print our labels the print job still is in Duplex mode (verified by examining the PCL output by printing to file).

The line

e.PageSettings.PrinterSettings.Duplex = Duplex.Simplex;  

has no effect.

How do we force the page to be printed in Simplex?

Our Code
We are printing to an A4 printer using the .Net PrintDocument / PrintController classes, as shown below. This code is from a test app that can reproduce the issue with a simple example.

We have a custom PrintDocument class that:
a) Sets the printing settings in OnQueryPageSettings

protected override void OnQueryPageSettings(QueryPageSettingsEventArgs e)
{
    // This setting has no effect
    e.PageSettings.PrinterSettings.Duplex = Duplex.Simplex;
}

b) Generates the page content in the OnPrintPage method:

protected override void OnPrintPage(PrintPageEventArgs e)
{
    Graphics g = e.Graphics;

    int fs = 12;
    FontStyle style = FontStyle.Regular;
    Font baseFont = new Font("Arial", fs, style);

    PointF pos = new PointF(10, 10);

    g.DrawString("This is a test page", baseFont, Brushes.Black, pos);

    e.HasMorePages = false;
}

To kick this off we create an instance of our PrintDocument, assign it the StandardPrintController and call Print():

void DoPrint()
{
    MyPrintDocument mydoc = new MyPrintDocument();

    PrinterSettings ps = ShowPrintDialog();
    if (ps != null)
    {
        mydoc.PrinterSettings = ps;
        StandardPrintController cont = new StandardPrintController();
        mydoc.PrintController = cont;
        mydoc.Print();
    }
}

Thanks, Adam

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T00:08:42+00:00Added an answer on June 2, 2026 at 12:08 am

    Setting the PrinterSettings.Duplex property on OnQueryPageSettings has no effect, you need to set this property before calling Print(). (It seems obvious now I think about it!)

    This works:

    void DoPrint()
    {
        MyPrintDocument mydoc = new MyPrintDocument();
    
        PrinterSettings ps = ShowPrintDialog();
        if (ps != null)
        {
            ps.Duplex = Duplex.Simplex; // This works
    
            mydoc.PrinterSettings = ps;
            StandardPrintController cont = new StandardPrintController();
            mydoc.PrintController = cont;
            mydoc.Print();
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

One of our customers has a problem that we cannot reproduce. We programmatically copy
I have a customer that has an old non-existant application; he had a problem
I have a connection protocol that has been defined by our customer. Data are
our customer is loving the Jasper viewer, but we have a problem. It exports
We had huge performance problem when deploying our ASP.NET app at a customer, which
I have a problem. Actually in our application, earlier the customer was allowed to
I have an intranet site that our customer needs to access both internally and
Preface We are providing customers with our service API. Each customer has own subdomain
An issue that has come to light is to open up our application (we
Here is our situation. Our software has an option to print cards (credit card

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.