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 8225935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T15:35:09+00:00 2026-06-07T15:35:09+00:00

My application prints from a canvas (WPF, C#), but the application needs to have

  • 0

My application prints from a canvas (WPF, C#), but the application needs to have assigned a default printer. The default printer is saved as a .ini file on the PC. The concept is, staff can click the print button on my canvas, the canvas would generate a layout and then send to the printer.

So, the 2 things I need to do are:

  1. Set the default printer based upon a string within a text file
  2. Print after binding

After I click the print button, the canvas updates with the layout I want (via databinding) and the job is sent to the printer (the printer detects the job and is displayed in the printer queue), but the printer never prints the document. It’s almost as if I’ve queued a job but never said ‘start’.

My canon then gives me an error (this could be a red hearing though) which is “Another printer is using the printer. The following status is the usage status of that computer —“

Here are the 2 main methods I’m using.

internal void AutoPrint()
{
        string printerName = GetPrinterNameFromTextFile();
        PrintDialog dialog = new PrintDialog();
        getView(); //queries database, returns model and binds

        Print(dialog, config.PrinterName);
}

internal void Print(PrintDialog dialog, string printerName)                  
{                  
        Canvas canvas = new Canvas();
        canvas = this.PrintCanvas;

        PrintQueue queue = new LocalPrintServer().GetPrintQueue(printerName);
        dialog.PrintQueue = queue;
        Dispatcher.BeginInvoke(DispatcherPriority.Loaded, new Action(delegate()
            {
                dialog.PrintVisual(canvas, "");
            }));
}
  • 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-07T15:35:10+00:00Added an answer on June 7, 2026 at 3:35 pm

    OK, I asked a different question else where but provided source code with the answer:
    C# printing with WPF

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have one application that prints messages from Test.exe in console .My java program
My application prints (to a printer) the information shown on screen (using the Canvas
I have a flex 3 application that creates an Image from a canvas which
I have an application need to print a MS Word .docx file from the
Say I have a third party Application that does background work, but prints out
I am building a web application that needs to print directly from browser, however,
In the java web application need to select the file from server and print
How can I determine if printer is connected? Typically this application prints to the
I'm working on a mobile application (C#/WPF on a tablet PC) that prints to
I am writing a small application that prints some stickers to a special printer.

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.