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

  • Home
  • SEARCH
  • 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 94259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T23:28:24+00:00 2026-05-10T23:28:24+00:00

What is the best way to print stuff from c#/.net? The question is in

  • 0

What is the best way to print stuff from c#/.net?

The question is in regard to single pages as well as to reports containing lots of pages.

It would be great to get a list of the most common printing libs containing the main features and gotchas of each of them.

[Update] for standard windows clients (or servers), not for web apps, please.

  • 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. 2026-05-10T23:28:25+00:00Added an answer on May 10, 2026 at 11:28 pm

    For reports, I use the RDLC control.

    For everything else, I use the inherent printing objects within .NET.

    Edit The inherent printing objects are all found in the System.Drawing.Printing namespace. When you use the PrintDialog or the PrintPreviewDialog in a WinForms (or WPF) application, it is to these objects that you’re turning over control.

    The fundamental concept is that you’re drawing to the printer. The simplest form of this is:

    Sub MyMethod()      Dim x as New PrintDocument      AddHandler x.PrintPage, AddressOf printDoc_PrintPage      x.Print End Sub Sub printDoc_PrintPage( sender as Object,  e as PrintPageEventArgs)       Dim textToPrint as String= '.NET Printing is easy'       dim printFont as new Font('Courier New', 12)       dim leftMargin as int= e.MarginBounds.Left       dim topMargin as int = e.MarginBounds.Top       e.Graphics.DrawString(textToPrint, printFont, Brushes.Black, leftMargin, topMargin) End Sub 

    What’s happening here is that when my object (x) is sent the print command, it raises the ‘PRINT PAGE’ event (which is designed to print 1 page at a time). This event then uses the Graphics attribute of the PrintPageEventArgs to draw the relevant string directly to the print spooler.

    Here’s one tutorial, and a quick Google search for ‘.NET printing tutorial’ returns a bit over 200K results.

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

Sidebar

Ask A Question

Stats

  • Questions 74k
  • Answers 74k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer As others have pointed out, there is no direct way… May 11, 2026 at 2:22 pm
  • added an answer This depends on the CPU you're using, on the OS,… May 11, 2026 at 2:22 pm
  • added an answer Its most likely the wrong runtime. Make sure you are… May 11, 2026 at 2:22 pm

Related Questions

I have a windows service written in C# that acts as a proxy for
Are there some good resources for fixed point math in C#? I've seen things
We have a C++ library that we provide to several different clients. Recently we
If you had to choose your Favorite (clever) techniques for defensive coding, what would

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.