How to Set Print DPI in C#

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. Install IronPrint with NuGet Package Manager

    PM > Install-Package IronPrint
  2. Copy 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
    });
  3. Deploy 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 will use its highest supported resolution.

:path=/static-assets/print/content-code-examples/how-to/set-the-dpi/office-and-high-res-dpi.cs
using IronPrint;

// Standard office quality (300 DPI)
var officeSettings = new PrintSettings
{
    Dpi = 300
};
Printer.Print("invoice.pdf", officeSettings);

// High-resolution output (600 DPI)
var highResSettings = new PrintSettings
{
    Dpi = 600
};
Printer.Print("photo-proof.png", highResSettings);
Imports IronPrint

' Standard office quality (300 DPI)
Dim officeSettings As New PrintSettings With {
    .Dpi = 300
}
Printer.Print("invoice.pdf", officeSettings)

' High-resolution output (600 DPI)
Dim highResSettings As New PrintSettings With {
    .Dpi = 600
}
Printer.Print("photo-proof.png", highResSettings)
$vbLabelText   $csharpLabel

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 15–25 lines of 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.

DPI Best For Notes
72–150 Internal drafts, proofs, test prints Fast output, low toner usage
300 Business documents, invoices, reports IronPrint default; standard commercial quality
600 Marketing materials, graphics, charts Noticeably sharper images and fine lines
1200+ Photography, archival, fine art Requires 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.

:path=/static-assets/print/content-code-examples/how-to/set-the-dpi/combine-dpi-with-settings.cs
using IronPrint;

var settings = new PrintSettings
{
    Dpi = 600,
    PaperSize = PaperSize.A4,
    PaperOrientation = PaperOrientation.Landscape,
    PaperMargins = new Margins(10, 10, 10, 10),
    NumberOfCopies = 2,
    Grayscale = true
};

Printer.Print("quarterly-dashboard.pdf", settings);
Imports IronPrint

Dim settings As New PrintSettings With {
    .Dpi = 600,
    .PaperSize = PaperSize.A4,
    .PaperOrientation = PaperOrientation.Landscape,
    .PaperMargins = New Margins(10, 10, 10, 10),
    .NumberOfCopies = 2,
    .Grayscale = True
}

Printer.Print("quarterly-dashboard.pdf", settings)
$vbLabelText   $csharpLabel

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.

:path=/static-assets/print/content-code-examples/how-to/set-the-dpi/dialog-with-dpi-preset.cs
using IronPrint;

// Pre-select 600 DPI, but let the user override
var settings = new PrintSettings
{
    Dpi = 600,
    PaperSize = PaperSize.Letter
};

Printer.ShowPrintDialog("design-proof.pdf", settings);
IRON VB CONVERTER ERROR developers@ironsoftware.com
$vbLabelText   $csharpLabel

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 $749.

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 37,845 | Version: 2026.3 just released
Still Scrolling Icon

Still Scrolling?

Want proof fast? PM > Install-Package IronPrint
run a sample watch your document hit the printer.