IRONSOFTWAREHOME

How to Set Print DPI in C#

Curtis Chau
Curtis Chau
Updated: August 2, 2026

DPI (dots per inch) controls print resolution - the number of ink dots a printer places per inch of paper. Higher DPI produces sharper text and smoother images but increases processing time and toner usage. Lower DPI prints faster and works well for internal drafts. Setting DPI programmatically ensures every print job meets the quality standard the application requires, regardless of the user's default printer configuration.

IronPrint exposes a Dpi property on the PrintSettings class. We set it to an integer value, pass the settings to Printer.Print(), and the document prints at the specified resolution. The default is 300 DPI, which matches the standard for commercial printing.

Quickstart: Set Print DPI
  1. Install IronPrint via NuGet: Install-Package IronPrint
  2. Add using IronPrint; to the file
  3. Create a PrintSettings object
  4. Set Dpi to the desired resolution (e.g., 300, 600, 1200)
  5. Pass settings to Printer.Print() or Printer.ShowPrintDialog()
  1. 1Install IronPrint with NuGet Package Manager

    PM > Install-Package IronPrint

  2. 2Copy and run this code snippet.

    using IronPrint;
    
    // Print a PDF at 600 DPI for high-quality output
    Printer.Print("report.pdf", new PrintSettings
    {
        Dpi = 600
    });
    C#
  3. 3Deploy to test on your live environment

    Start using IronPrint in your project today with a free trial
    arrow pointer

How Do I Set Print DPI in C#?

The Dpi property on PrintSettings accepts any positive integer. The default value is 300, which is the standard resolution for business documents. The actual DPI used for printing may be limited by the capabilities of the physical printer - if we set 1200 DPI on a printer that maxes out at 600, the printer driver may substitute its closest supported resolution.

using IronPrint;

// Configure 300 DPI for standard office quality
var officeSettings = new PrintSettings
{
    Dpi = 300
};

// Print the invoice
Printer.Print("invoice.pdf", officeSettings);

With native .NET, controlling print resolution requires creating a PrintDocument, accessing DefaultPageSettings.PrinterResolution, handling the PrintPage event, and manually rendering content with Graphics.DrawImage(). This involves noticeably more boilerplate code. IronPrint reduces this to a single integer property on a settings object.

What DPI Should I Use for Different Print Jobs?

Choosing the right DPI depends on the content type and purpose. Higher resolution is not always better - it increases spool size and print time without visible benefit for text-heavy documents.

DPIBest ForNotes
72-150Internal drafts, proofs, test printsFast output, low toner usage
300Business documents, invoices, reportsIronPrint default; standard commercial quality
600Marketing materials, graphics, chartsNoticeably sharper images and fine lines
1200+Photography, archival, fine artRequires compatible printer; large spool files

For most applications, 300 DPI provides the best balance between quality and performance. We recommend starting with the default and increasing only when the output requires visible improvement in image clarity or fine detail.

How Do I Combine DPI with Other Print Settings?

DPI works alongside other PrintSettings properties to define a complete print job. We can configure paper size, orientation, margins, copies, and grayscale mode in the same object.

using IronPrint;

// Combine 600 DPI with landscape A4 and grayscale output
var settings = new PrintSettings
{
    Dpi = 600,
    PaperSize = PaperSize.A4,
    PaperOrientation = PaperOrientation.Landscape,
    PaperMargins = new Margins(10, 10, 10, 10),
    NumberOfCopies = 2,
    Grayscale = true
};

// Print the dashboard
Printer.Print("quarterly-dashboard.pdf", settings);

Setting Grayscale = true at 600 DPI produces sharp monochrome output that is ideal for charts and data tables. The PaperMargins values are in millimeters.

How Do I Let Users Adjust DPI in the Print Dialog?

When we pass PrintSettings to Printer.ShowPrintDialog(), the dialog opens with our preset DPI. The user can accept it or adjust resolution before printing.

using IronPrint;

// Pre-configure 600 DPI for the dialog
var settings = new PrintSettings
{
    Dpi = 600,
    PaperSize = PaperSize.Letter
};

// Open the dialog with pre-selected DPI
Printer.ShowPrintDialog("design-proof.pdf", settings);

For non-blocking UI scenarios, Printer.ShowPrintDialogAsync() accepts the same parameters and keeps the application responsive. The dialog lets users verify DPI against their printer's supported resolutions before printing - helpful when switching between a 600 DPI office laser and a 1200 DPI photo printer. For fully automated workflows where no user interaction is needed, use Printer.Print() for silent printing instead.

Next Steps

DPI is a single integer on the PrintSettings object - set it to match the quality requirements of each print job. Start with 300 for business documents and increase to 600 or higher for graphics-heavy output.

Explore the print settings how-to for every available property, the Printer class API reference for the complete method surface, and the code examples page for ready-to-run snippets. The IronPrint tutorials walk through the full printing lifecycle, and the changelog tracks recent updates.

Start a free 30-day trial to test DPI settings in a live project. When ready, view licensing options starting at $999.

Frequently Asked Questions

How can I programmatically set the print DPI in C# using IronPrint?

You can set the print DPI in C# using IronPrint by configuring the `Dpi` property on the `PrintSettings` class. Assign an integer value to `Dpi` and provide this setting to `Printer.Print()` or `Printer.ShowPrintDialog()`. The default DPI is 300, which is suitable for most business document printing.

What is the default print DPI when using IronPrint?

The default print DPI when using IronPrint is 300. This setting aligns with the standard resolution for business documents and ensures a balance between print quality and speed.

Why is it important to set print DPI programmatically in IronPrint?

Setting print DPI programmatically in IronPrint ensures consistent print quality across different jobs and printers, regardless of the user's default printer settings. It allows precise control over the resolution of printed documents.

What DPI should I choose for high-quality image or marketing material prints?

For high-quality images or marketing materials, you should set the DPI to 600 or higher using IronPrint. This provides noticeably sharper images and finer detail, though it requires more processing power and may increase print times.

How can I adjust DPI settings alongside other print settings in IronPrint?

In IronPrint, you can adjust DPI settings alongside other print settings like paper size, orientation, and grayscale mode by configuring the properties on a single `PrintSettings` object. Pass this configuration to `Printer.Print()` to execute the print job with all preferred settings.

Can users modify DPI settings in a print dialog when using IronPrint?

Yes, when `PrintSettings` is passed to `Printer.ShowPrintDialog()`, users can adjust the DPI setting in the dialog. This allows users to modify the resolution based on the printer's capabilities before proceeding with printing.

What happens if I set a DPI higher than my printer supports using IronPrint?

If you set a DPI higher than what your printer supports using IronPrint, the printer driver will typically adjust to the closest supported resolution. For example, a printer that maxes out at 600 DPI will not print at 1200 DPI.

Is IronPrint compatible with silent printing for automated workflows?

Yes, IronPrint supports silent printing for automated workflows via the `Printer.Print()` method, which processes print jobs without user interaction, ensuring fast and efficient document handling.

What should be considered when choosing a DPI setting in IronPrint?

Consider the type of content and its intended use when choosing a DPI setting in IronPrint. While 300 DPI works well for most business documents, higher resolutions like 600 DPI are better for detailed graphics or images. Higher DPI also means larger file sizes and longer print times.

Curtis Chau
Technical Writer

Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.

...
Read More

Ready to Get Started?

Nuget Downloads 46,090Version:2026.9just released

Get your free 30-day Trial Key instantly.
No credit card or account creation required
C# NuGet Library for PDF
Install with NuGet

Version: 2026.9

PM > Install-Package IronPrint
nuget.org/packages/IronPrint/
  1. In Solution Explorer, right-click References, Manage NuGet Packages
  2. Select Browse and search "IronPrint"
  3. Select the package and install
C# PDF DLL
Download DLL

Version: 2026.9

  1. Download and unzip IronPrint to a location such as ~/Libs within your Solution directory
  2. In Visual Studio Solution Explorer, right click References. Select Browse, "IronPrint.dll"

Licenses from $999

Key in blue circle

Get your free 30-day Trial Key instantly.

Your trial license will be sent to your email address

No limitations. 100% unlocked. No credit card.

bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
Book your free Live Demo
Booking Badge

Trusted by Millions of Engineers Worldwide

Iron Software's customer logos
Get Your No-Obligation Consult
Complete the form below or email sales@ironsoftware.com
Your details will always be kept confidential.
Trusted by Millions of Engineers Worldwide
Iron Software's customer logos
Get your free 30-day Trial Key instantly.
No credit card or account creation required