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/set-the-dpi-office-and-high-res-dpi.cs
using IronPrint;

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

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

' Configure 300 DPI for standard office quality
Dim officeSettings As New PrintSettings With {
    .Dpi = 300
}

' Print the invoice
Printer.Print("invoice.pdf", officeSettings)
$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/set-the-dpi-combine-dpi-with-settings.cs
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);
Imports IronPrint

' Combine 600 DPI with landscape A4 and grayscale output
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
}

' Print the dashboard
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/set-the-dpi-dialog-with-dpi-preset.cs
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);
Imports IronPrint

' Pre-configure 600 DPI for the dialog
Dim settings As New PrintSettings With {
    .Dpi = 600,
    .PaperSize = PaperSize.Letter
}

' Open the dialog with pre-selected DPI
Printer.ShowPrintDialog("design-proof.pdf", settings)
$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 $999.

Frequently Asked Questions

What is DPI in printing?

DPI stands for Dots Per Inch, and it refers to the resolution of a printed document. Higher DPI settings result in higher quality prints.

How can I set the print DPI using IronPrint?

You can set the print DPI in IronPrint by configuring the PrintSettings.Dpi property. The default is 300 DPI, but it can be adjusted to meet the specific needs of your print job.

What is the default DPI setting in IronPrint?

The default DPI setting in IronPrint is 300 DPI, which is suitable for most standard print jobs.

Why would I need to adjust the DPI settings?

Adjusting the DPI settings allows you to control the resolution and quality of the printed document. For higher quality prints, you might increase the DPI, while lower DPI settings can be used for drafts or less detail-focused prints.

Is it possible to set different DPI for different print jobs?

Yes, IronPrint allows you to adjust the DPI for each individual print job, providing flexibility to cater to different printing requirements.

What happens if I set a very high DPI in IronPrint?

Setting a very high DPI can increase the print quality but might also lead to larger file sizes and longer processing times. It is important to balance DPI settings based on the desired quality and performance requirements.

Can I use IronPrint to print high-resolution images?

Yes, IronPrint supports high-resolution printing by allowing you to adjust the DPI settings, ensuring that your images are printed with the desired clarity and detail.

Does changing the DPI affect the file size of the print job?

Yes, increasing the DPI can lead to larger file sizes, as more data is required to render higher resolution prints. It's important to consider the trade-off between print quality and file size.

What is the recommended DPI setting for standard documents?

For standard documents, a DPI setting of 300 is generally recommended, as it provides a good balance between print quality and performance.

How does IronPrint help in managing print quality?

IronPrint provides tools to configure print settings such as DPI, allowing users to customize the resolution and quality of their printed documents to meet specific needs.

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 40,390 | Version: 2026.5 just released
Still Scrolling Icon

Still Scrolling?

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