# IronPrint > The C# Printing Library. Deploy printing capabilities to any .NET Application. Print with dialog or print silently. Supports .NET Framework. A single-file summary of the IronPrint documentation: 33 pages, each as its own abstract, so a model can read the documentation in one pass rather than fetching every URL. Blog posts are not included — see https://ironsoftware.com/print/csharp/llms.txt for the link index, and https://ironsoftware.com/print/csharp/llms-full-catalog.txt for one that covers the blog too. ## Getting Started ### Applying License Keys to IronPrint in .NET 10 | C# Print Guide https://ironsoftware.com/print/csharp/get-started/license-keys/ The article "Applying Software License Keys to C# Print | IronPrint" provides a detailed guide on acquiring and using IronPrint license keys for deploying projects without restrictions or watermarks. The process begins with purchasing a license or obtaining a free 30-day trial key, followed by downloading the latest version of IronPrint. To apply the license key, users can insert specific code at the startup of their application or configure it globally using Web.Config, App.Config, or a .NET Core appsettings.json file. The article notes a known issue with applying license keys in Web.config files for specific project types and advises checking the IsLicensed property to confirm correct application. Validation of the license key is crucial, and the article offers code snippets to verify its validity. It emphasizes the importance of ensuring the key is valid for using IronPrint features. For further assistance, users are encouraged to explore comprehensive tutorials and documentation available on the IronPrint website or contact support. Licenses start at $499, including one year of support and updates. The article is a valuable resource for developers looking to integrate IronPrint into their projects seamlessly. ## Tutorials ### C# Print Document for .NET | IronPrint https://ironsoftware.com/print/csharp/tutorials/print-document/ The article titled "Print Document for .NET C# | IronPrint" introduces IronPrint, a comprehensive printing library tailored for .NET C# developers to incorporate printing functionalities into their applications. IronPrint offers robust compatibility across various operating systems, including Windows, macOS, iOS, and Android, making it a versatile choice for developers working on desktop and mobile platforms. The tutorial provides a detailed guide on using IronPrint, starting with silent and dialog-based print operations which allow developers to either bypass or include user interaction during the printing process. The library enables seamless printing of diverse document formats such as PDF, PNG, HTML, TIFF, GIF, JPEG, IMAGE, and BITMAP. Additionally, developers can programmatically apply specific print settings, such as grayscale and number of copies, to customize the print output according to specific requirements. IronPrint also allows developers to retrieve information about available printers, facilitating dynamic printer selection. The article emphasizes the ease of integrating these capabilities into .NET C# applications, thereby enhancing the print functionality without compromising on simplicity or user experience. ## How-To Guides ### Print PDF in ASP.NET Framework with C# | IronPrint https://ironsoftware.com/print/csharp/how-to/aspnet-web-application-framework/ IronPrint's PrintAsync method enables non-blocking document printing in ASP.NET Framework web applications, preventing UI freezes during print operations. This tutorial demonstrates implementing asynchronous PDF printing functionality in ASP.NET applications using C#. The article covers the integration process, starting with adding a print button to the web interface, implementing the PrintAsync method in the controller, and configuring the application for responsive document printing. The asynchronous approach is critical for web applications handling multiple concurrent print requests without performance degradation. The tutorial provides code examples showing how to add a print button in Index.cshtml and implement the corresponding ActionResult method in the controller. IronPrint offers comprehensive features including printer information retrieval and custom print settings, making it suitable for enterprise ASP.NET applications requiring robust printing functionality. The article emphasizes the advantages of using PrintAsync over synchronous Print methods, particularly in multi-user web environments where maintaining application responsiveness is essential. A minimal 5-step workflow is provided for quick implementation. ### How to Flatten PDFs Before Printing in C# | IronPrint https://ironsoftware.com/print/csharp/how-to/flatten-pdfs/ Flattening PDFs is a crucial step in ensuring that the printed output of a document matches the intended design by merging all layers into a single one, thereby eliminating issues with form fields, annotations, and images. The article "How to Flatten PDFs Before Printing in C#" on IronPrint's website provides a comprehensive guide on achieving this in C# using IronPrint. It highlights the simplicity of the process, where a single boolean in the PrintSettings can transform complex PDF documents into flattened versions. This ensures that forms and annotations are not interactive and images are rendered correctly, thus maintaining the integrity of the document's visual elements during printing. The article also outlines the benefits of flattening PDFs, such as enhanced security, improved consistency in appearance across different devices, and reduced chances of data alteration. Additionally, the guide reassures developers of the efficiency of using IronPrint's library, making it an indispensable tool for those looking to streamline their document management processes in C#. Whether for individual use or in a corporate setting, flattening PDFs before printing is portrayed as an essential practice for ensuring that the final printed documents are precise and professional. ### How to Print in Grayscale in C# | IronPrint .NET https://ironsoftware.com/print/csharp/how-to/grayscale-printing/ The article "How to Print in Grayscale in C# | IronPrint .NET" provides a comprehensive guide on implementing grayscale printing using the IronPrint library in C#. It highlights the simplicity of setting up monochrome printing through a single property change, which can significantly reduce printing costs by limiting the use of colored ink. The guide covers various scenarios, including silent printing, which allows for print jobs to execute without user intervention, and asynchronous printing, which enables tasks to run in the background for improved performance and efficiency. Additionally, it explores the combination of these settings to optimize the printing process further. The article is designed for developers looking to integrate efficient and cost-effective printing solutions in their applications using the .NET framework. By leveraging the capabilities of IronPrint, developers can enhance their applications with robust printing functionalities, ensuring smooth and adaptable output management. Whether for individual or enterprise-level solutions, this guide offers practical insights and step-by-step instructions to facilitate the integration of grayscale printing in any C# project. ### C# Print Settings Configuration Guide | IronPrint https://ironsoftware.com/print/csharp/how-to/print-settings/ IronPrint provides a comprehensive PrintSettings class for configuring C# print operations with ease. Developers can control essential printing parameters including paper size, orientation, DPI resolution, number of copies, margins, and grayscale options. The configuration process is straightforward: create a PrintSettings object, set desired properties, and pass it to the Print or ShowPrintDialog method. The library supports various paper sizes like A4 and orientations (portrait/landscape), while allowing precise control over print quality through DPI settings. IronPrint eliminates complex setup requirements, enabling developers to implement custom print configurations with minimal code. The workflow involves just five steps: downloading the library, instantiating PrintSettings, configuring preferences, passing the object to print methods, and verifying the output. This approach simplifies print management in C# applications, making it ideal for developers who need reliable, customizable printing functionality without dealing with low-level printer APIs or complex configuration procedures. ### C# Print Dialog Guide — Show & Configure | IronPrint https://ironsoftware.com/print/csharp/how-to/print-with-dialog/ The article "C# Print Dialog Guide — Show & Configure" by IronPrint serves as a comprehensive tutorial for developers looking to integrate print functionality within their C# applications using the IronPrint library. It focuses on the use of the `ShowPrintDialog()` method, allowing developers to invoke a print dialog box that users can interact with to manage their printing preferences. The guide details how to pre-configure settings such as page range, copies, and orientation before displaying the dialog, enhancing user experience and efficiency. Additionally, it covers support for asynchronous operations, which is essential for modern application development, ensuring that the UI remains responsive during print tasks. The tutorial also highlights the capability to print various document types, including PDFs and images, making the library versatile for different printing needs. Step-by-step code snippets are included to demonstrate the implementation process, ensuring developers can follow along with ease. By utilizing IronPrint, developers can offer robust printing solutions within their applications, enhancing functionality and user satisfaction. This guide is a valuable resource for C# developers aiming to streamline the integration of print dialogs and improve the overall utility of their software solutions. ### How to Get Printer Names in C# | IronPrint .NET https://ironsoftware.com/print/csharp/how-to/retrieve-printer-names/ The article titled "How to Get Printer Names in C# | IronPrint .NET" serves as a comprehensive guide for developers looking to retrieve printer names using C#. The piece offers step-by-step instructions on how to obtain a list of installed printers with a single method call, making the process straightforward and efficient. It covers both synchronous and asynchronous methods, providing flexibility depending on the application's needs. The article further delves into how to select and print to a specific printer by name, enhancing its utility for projects requiring targeted printing functionality. By using IronPrint .NET, developers can streamline their printing processes, thanks to its seamless integration and robust capabilities. The guide is designed to be accessible for C# developers of various experience levels, ensuring that even those new to the language or printing functionalities can follow along effectively. Overall, the article is a valuable resource for anyone looking to implement efficient, flexible printer management in their C# applications. ### How to Print Multiple Copies in C# | IronPrint .NET https://ironsoftware.com/print/csharp/how-to/set-number-of-copies/ The article "How to Print Multiple Copies in C# | IronPrint .NET" provides a comprehensive guide on configuring print settings to produce multiple copies of documents using C#. It focuses on leveraging the IronPrint library to simplify the process by utilizing a single property. The guide addresses various aspects of printing, including silent printing and asynchronous workflows, which are particularly beneficial for developers seeking to integrate efficient printing capabilities into their applications. The article details step-by-step instructions on setting up the print configuration, making it easier for developers to manage print jobs and streamline their workflows. Additionally, it explores combining different settings to enhance functionality and optimize the print process. By the end of the article, readers will have a clear understanding of how to implement and control multiple-copy print jobs within their C# projects, ensuring a more efficient and seamless printing experience. The article is aimed at developers who are looking for practical solutions to incorporate robust printing features into their applications using the IronPrint .NET library. ### How to Set Print Margins in C# | IronPrint .NET https://ironsoftware.com/print/csharp/how-to/set-paper-margins/ Setting print margins in C# has been simplified with the IronPrint .NET library, which enables developers to customize print margins with ease. The article provides a comprehensive guide on using the Margins class within IronPrint to set various types of margins, including uniform, per-side, and borderless options. By leveraging this class, developers can define margins with just a single line of code, enhancing efficiency and precision in print layout configurations. The tutorial walks through the process of implementing these options, ensuring that users can tailor the print output to meet specific requirements. It highlights the flexibility offered by IronPrint .NET in handling print layouts, making it an invaluable tool for developers who need precise control over document presentation. The article also delves into practical examples, showcasing code snippets that demonstrate how to apply different margin settings, thus providing readers with a clear understanding of how to achieve desired results. Overall, the article serves as a useful resource for developers looking to enhance their applications with custom print capabilities, emphasizing the ease and effectiveness of the IronPrint .NET solution for setting paper margins in C#. ### Set Paper Orientation in C# Printing | IronPrint https://ironsoftware.com/print/csharp/how-to/set-paper-orientation/ The article titled "Set Paper Orientation in C# Printing | IronPrint" provides a detailed guide on configuring paper orientation when printing documents using C#. Emphasizing the versatility of the IronPrint library, it explains how developers can easily set the paper orientation property to ensure documents are printed in portrait, landscape, or automatic modes. This functionality is crucial for developers looking to maintain consistent print outputs across different document types and printer setups. The article breaks down the process into simple, actionable steps, demonstrating how to implement the PaperOrientation property within the C# environment. It offers practical examples and code snippets, making it accessible even for those with a basic understanding of C#. By leveraging IronPrint's capabilities, developers gain full control over their print jobs, enhancing both the efficiency and reliability of printing operations. This resource is a valuable asset for software developers seeking to optimize their applications' print functionalities, ensuring that print jobs align with user preferences and document specifications. Overall, the guide highlights the ease and effectiveness of using IronPrint to manage paper orientation, reinforcing the library's role as a powerful tool in the C# developer's arsenal. ### How to Set Paper Size for Printing in C# | IronPrint https://ironsoftware.com/print/csharp/how-to/set-paper-size/ The article, "How to Set Paper Size for Printing in C# | IronPrint," provides a comprehensive guide on configuring paper sizes when printing using the IronPrint library in C#. It covers various standard paper sizes like A4, Letter, and Legal, offering practical code examples to facilitate understanding and implementation. The tutorial begins with a brief introduction to the significance of setting the correct paper size, followed by step-by-step instructions on how to achieve this within the C# programming environment. It elaborates on the integration of IronPrint for custom printing requirements and emphasizes its ease of use for developers looking to enhance their application's printing capabilities. The article is tailored for both novice and experienced programmers, ensuring they can efficiently manage paper size settings to produce professional-quality printouts. By the end of the guide, readers are expected to have a clear understanding of how to apply these configurations in their applications, enhancing the flexibility and functionality of their printing processes. This detailed walkthrough not only empowers developers to optimize their print settings but also showcases the versatility of IronPrint in handling diverse printing tasks. ### Control Print DPI in C# | IronPrint Guide https://ironsoftware.com/print/csharp/how-to/set-the-dpi/ The article titled "Control Print DPI in C# | IronPrint Guide" provides a comprehensive tutorial on configuring print resolution using the IronPrint library in C#. It explains the significance of DPI (dots per inch) in determining the quality of printed documents and how adjusting this parameter can cater to various printing needs. The guide delves into the usage of `PrintSettings.Dpi`, a crucial property in IronPrint that allows developers to set the desired DPI for any print job. By default, IronPrint uses a DPI of 300, which is generally suitable for most standard documents. However, the article emphasizes the flexibility of this setting, as users can modify the DPI to enhance or reduce print quality based on specific requirements. Practical examples illustrate how to implement these changes in a C# environment, ensuring developers can seamlessly incorporate DPI adjustments into their applications. The guide offers valuable insights into optimizing print output, making it an essential resource for developers seeking to improve the quality and efficiency of their printing solutions using C# and IronPrint. ### Silent Printing in C# — No-Dialog Guide | IronPrint https://ironsoftware.com/print/csharp/how-to/silent-printing/ The "Silent Printing in C# — No-Dialog Guide" article from IronPrint provides a comprehensive tutorial on implementing silent printing functionality in C# applications. Silent printing refers to the process of printing documents without displaying the print dialog box, offering a seamless user experience. The guide begins by introducing the concept and benefits of silent printing, particularly in environments where efficiency and automation are prioritized. It then details the setup process, including configuring printer settings, adjusting DPI (dots per inch) for print quality, and setting the number of copies to print. The article emphasizes the use of IronPrint, a tool designed to simplify the integration of silent printing capabilities into C# projects. Additionally, it covers advanced features such as asynchronous batch printing, which allows multiple documents to be printed in succession without user intervention. The guide is tailored for developers seeking to enhance application functionality with minimal user interaction, ensuring that technical requirements are met without compromising usability. By following this guide, developers can effectively implement silent printing, streamlining operations and improving workflow efficiency within their C# applications. ### How to Specify the Printer Name in C# | IronPrint https://ironsoftware.com/print/csharp/how-to/specify-printer-name/ The article "How to Specify the Printer Name in C# | IronPrint" provides a detailed guide on targeting a specific printer using C# programming language with IronPrint. It starts by explaining the significance of selecting the correct printer, particularly in environments where multiple printers are available. The article outlines the steps necessary to discover available printers on a network or a local machine. By utilizing the PrinterSettings class in C#, developers can enumerate through the list of installed printers. The core of the guidance focuses on setting the PrinterName property, which allows developers to specify the exact printer by name. This property is crucial for ensuring that print jobs are sent to the intended printer, avoiding misprints and inefficiencies. The article includes practical code examples and snippets that demonstrate how to implement this property within a C# application. Additionally, the article highlights the ease of integration with IronPrint, showcasing its capabilities to streamline the printing process. By following these instructions, developers can enhance their applications’ functionality, ensuring precise printer targeting and efficient print management. The guide is an essential resource for developers looking to optimize printing tasks within their software solutions. ## Code Examples ### Code Example: Flatten PDFs Before Printing | IronPrint https://ironsoftware.com/print/csharp/examples/flatten-pdfs/ The Flatten PDFs code example illustrates how to use the Flatten property on the PrintSettings class in IronPrint to merge all interactive form fields, annotations, and layered content into a static representation before the document reaches the printer. When Flatten is set to true, filled-in text fields, checkboxes, digital signatures, and embedded images become part of the page's visual layer, guaranteeing that the printed copy faithfully reproduces the on-screen appearance. This technique is essential for documents that have been completed by end users — such as tax forms, contracts, or inspection checklists — where missing or misaligned interactive elements could cause confusion or legal issues. The flattening operation is performed in memory by IronPrint, so the original PDF file on disk remains untouched. Developers can combine this setting with other PrintSettings properties like PaperSize and Grayscale for full control over the final output. ### Code Example: Get Printer Names | IronPrint https://ironsoftware.com/print/csharp/examples/get-printer-names/ The article titled "Code Example: Get Printer Names" from IronPrint provides a straightforward guide on how to retrieve names of printers connected to a machine using C#. The core functionality is encapsulated in the GetPrinterNames method, which leverages the System.Drawing.Printing namespace to access printer settings. The method initializes an empty list, iterates through the PrinterSettings.InstalledPrinters collection, and populates the list with the names of each installed printer. The resulting list of printer names is then returned. The article provides a complete code example demonstrating how to implement this method in a C# class called PrinterUtility. This class includes a Main method that calls GetPrinterNames, retrieves the list of printers, and prints each name to the console. Additionally, the article mentions the use of relevant namespaces such as System, System.Collections.Generic, and System.Drawing.Printing, explaining their roles in the process. This code snippet offers a practical solution for listing printers, which can be beneficial for debugging or managing printer configurations in larger applications. The page also links to related documentation, tutorials, and resources for further exploration of IronPrint's capabilities. ### Code Example: Grayscale Printing | IronPrint https://ironsoftware.com/print/csharp/examples/grayscale-printing/ The Grayscale Printing code example shows how to enable monochrome output by setting the Grayscale property on the PrintSettings object in IronPrint. When activated, all color information in the document is converted to corresponding shades of gray before the data is sent to the print spooler. This conversion preserves the relative brightness and contrast of the original content, so headings, chart fills, and images remain visually distinguishable. Grayscale printing is particularly beneficial for internal memos, draft reviews, and archival copies where color adds no informational value. It can also dramatically reduce consumable costs on color laser and inkjet printers that charge a premium for color pages. The setting works consistently across Windows, macOS, and Linux, and can be combined with other PrintSettings properties such as Dpi and NumberOfCopies. The original document is never altered — the grayscale transformation happens entirely within the print pipeline. ### Code Example: Print Settings | IronPrint https://ironsoftware.com/print/csharp/examples/print-settings/ The article "Code Example: Print Settings | IronPrint" offers a comprehensive guide on customizing print settings using IronPrint. It explains how to instantiate and configure the PrintSettings class for various printing requirements. Key configurable options include PaperSize, which determines the size of the paper used, and PaperOrientation, which specifies the orientation as either Portrait or Landscape. The Dpi setting allows users to define the print resolution in dots per inch, although this may be constrained by the printer's capabilities. Users can also set the NumberOfCopies to indicate how many identical copies of a document should be printed, with a note that certain platforms may ignore this setting, resulting in only one copy being printed. The PrinterName setting specifies which printer to use, and PaperMargins sets the margins in millimeters. Additional features include printing in Grayscale, flattening PDFs before printing to display form field values and images, and selecting a specific printer Tray for the job, with the latter being a Windows-only feature. The article provides code examples in both C# and VB.NET, demonstrating how to configure these settings and execute a print command using IronPrint's Printer.Print method. ### Code Example: Print With Dialog | IronPrint https://ironsoftware.com/print/csharp/examples/print-with-dialog/ The article titled "Code Example: Print With Dialog" from IronPrint provides a detailed C# code example for enhancing printing experiences using the IronPrint library. It focuses on the implementation and functionality of the `Printer.ShowPrintDialog` method, which allows users to display a print settings dialog before printing. The programming example demonstrates passing the path to a PDF file directly to `Printer.ShowPrintDialog`, which opens the native operating system print dialog synchronously, letting the user choose a printer and adjust settings such as paper size or number of copies. Once the user confirms the dialog, IronPrint dispatches the document to the selected printer automatically, with no further code required. This example illustrates the integration of GUI print settings to provide a customizable and user-friendly printing experience. Additional resources, such as related documentation, tutorials, and guides, are also available for further reference. ### Code Example: Print Document | IronPrint https://ironsoftware.com/print/csharp/examples/print/ IronPrint is a comprehensive cross-platform printing solution designed to streamline document printing across various operating systems, including Windows, macOS, Linux, Android, and iOS. It offers seamless integration with multiple .NET projects, supporting frameworks such as Avalonia, MAUI, Xamarin (including Xamarin.iOS, Xamarin.Android, and Xamarin.Forms), and WPF. The core functionality of IronPrint revolves around its Print method, which, when used with the PrinterSettings object, allows for customized printing configurations. Users can set preferences like duplex printing, color printing, and paper size (e.g., A4) to tailor the print job to their needs. An example usage demonstrates how to implement IronPrint within a C# project, showcasing the initialization of PrinterSettings and the execution of the Print method to send a document to the default printer. Console outputs confirm the successful dispatch of the print job, providing feedback to the user. To fully leverage IronPrint's capabilities, developers must ensure the required libraries are referenced in their projects. Additional resources, including related tutorials and class documentation, are available to assist users in integrating and utilizing IronPrint effectively. ### Code Example: Set Number of Copies | IronPrint https://ironsoftware.com/print/csharp/examples/set-number-of-copies/ The Set Number of Copies code example shows how to use the NumberOfCopies property on the PrintSettings class in IronPrint to request multiple identical copies of a document from a single print call. Instead of invoking the print method in a loop, developers assign an integer value to NumberOfCopies and let the printer driver handle duplication and optional collation. This approach is more efficient because the document data is sent to the spooler only once, regardless of how many copies are requested. The property is useful in scenarios such as printing meeting handouts, warehouse pick slips, classroom worksheets, or any situation where the same page set is needed by multiple recipients. Note that on some platforms the driver may ignore the requested count and default to producing a single copy, so it is advisable to verify behavior on the target environment. NumberOfCopies works alongside all other PrintSettings properties, enabling developers to set resolution, paper size, and orientation in the same configuration object. ### Code Example: Set Paper Margins | IronPrint https://ironsoftware.com/print/csharp/examples/set-paper-margins/ The Set Paper Margins code example demonstrates how to configure the PaperMargins property on the PrintSettings class using IronPrint. The property accepts a Margins object with four integer values representing the left, top, right, and bottom margins in millimeters. By specifying these values, developers override the printer's default margin behavior and gain pixel-precise control over content placement on the physical page. Custom margins are frequently required for documents that must comply with corporate branding guidelines, legal filing standards, or binding and hole-punch requirements. For instance, increasing the left margin to 25 mm accommodates three-hole-punch binding, while reducing all margins maximizes the printable area for data-dense reports. The margin values are passed directly to the printer driver before rendering, ensuring consistent results regardless of the device's factory defaults. This property works alongside PaperSize and PaperOrientation to define the complete geometric layout of the printed page. ### Code Example: Set Paper Orientation | IronPrint https://ironsoftware.com/print/csharp/examples/set-paper-orientation/ The Set Paper Orientation code example shows how to control the page orientation of a print job by assigning PaperOrientation.Landscape or PaperOrientation.Portrait to the PaperOrientation property on the PrintSettings class. Landscape mode rotates the printable area so the longer paper edge runs horizontally, making it the preferred choice for spreadsheets, Gantt charts, presentation slides, and any content that is wider than it is tall. Portrait mode keeps the default vertical layout and is suited for letters, reports, and standard documentation. The orientation is communicated to the printer driver before rasterization, so the entire page coordinate system adjusts automatically — there is no need to rotate content manually. This property pairs naturally with PaperSize and PaperMargins for precise geometric control. IronPrint applies the orientation consistently across Windows, macOS, and Linux environments. ### Code Example: Set Paper Size | IronPrint https://ironsoftware.com/print/csharp/examples/set-paper-size/ The Set Paper Size code example demonstrates how to configure the PaperSize property on the PrintSettings class in IronPrint. By assigning a value such as PaperSize.A4, developers instruct the printer driver to format the output for a specific sheet size (210 × 297 mm for A4). IronPrint provides a range of predefined sizes including Letter (8.5 × 11 in), Legal (8.5 × 14 in), A3, A5, and others, covering the most common international and North American standards. Selecting the correct paper size before printing prevents content clipping, unwanted scaling, and paper waste that occur when the document dimensions do not match the loaded media. This property works in tandem with PaperOrientation and PaperMargins, giving developers full geometric control over the printed page. The setting is respected on Windows, macOS, and Linux, provided the physical printer supports the requested size. ### Code Example: Set the DPI | IronPrint https://ironsoftware.com/print/csharp/examples/set-the-dpi/ The Set the DPI code example illustrates how to adjust the print resolution of a document by setting the Dpi property on the PrintSettings class in IronPrint. DPI — dots per inch — determines how many individual ink or toner dots the printer lays down within each linear inch of paper. A higher value produces sharper text, smoother gradients, and more detailed images, while a lower value speeds up printing and reduces spooler file sizes. Common values include 150 DPI for internal drafts, 300 DPI for professional correspondence, and 600 DPI for high-fidelity graphics. IronPrint passes the requested resolution to the printer driver, which will use the closest supported value if the hardware cannot match the exact request. This means setting 600 DPI on a 300 DPI printer will produce output at the device's maximum capability rather than causing an error. The Dpi property can be combined with Grayscale, PaperSize, and other PrintSettings fields for comprehensive print job control. ### Code Example: Specify Printer Name | IronPrint https://ironsoftware.com/print/csharp/examples/specify-printer-name/ The Specify Printer Name code example demonstrates how to target a particular printer by setting the PrinterName property on the PrintSettings class in IronPrint. The value must correspond to one of the printer names returned by the Printer.GetPrinterNames method — for example, a network share name like "\\Office\HP_LaserJet" or a virtual device such as "Microsoft Print to PDF". This capability is essential in multi-printer environments where different document types should be routed to different devices: invoices to an accounting department printer, shipping labels to a thermal label printer, and internal memos to a nearby laser printer. If the specified name does not match any installed printer, the system will typically fall back to the default device or raise an error, depending on the OS. Developers should also be aware that when ShowPrintDialog is used in conjunction with PrinterName, the printer selected interactively in the dialog will override the programmatic setting. PrinterName can be combined with other PrintSettings properties like Dpi, PaperSize, and NumberOfCopies for complete job customization. ## Troubleshooting ### Engineering Request​ - IronPrint https://ironsoftware.com/print/csharp/troubleshooting/engineering-request-print/ The article titled "Engineering Request - IronPrint" from Iron Software provides guidance on how to submit an engineering support request specifically for IronPrint, a C# printing project. IronPrint's development is heavily influenced by customer feedback, and user-submitted issues help drive feature updates. To facilitate effective support, users must provide detailed information that enables the engineering team to replicate and test issues efficiently. Essential elements of a bug report include a clear description of the problem, log files, environment specifics like IronPrint version and operating system, example projects, code snippets, screenshots, exception messages, debugging details, and input parameters. Providing a comprehensive example project that replicates the issue significantly expedites the support process. The preferred format for these submissions is a zipped .NET console or web app project, with full sharing enabled via Google Drive or Dropbox. The article also includes a C# code snippet demonstrating exception handling and logging, which can aid in debugging. This structured approach ensures that the engineering team can quickly understand and address technical challenges users face with IronPrint, thereby fostering a collaborative environment for software development and issue resolution. ### IronPrint on macOS with .NET 8 (Apple Silicon) https://ironsoftware.com/print/csharp/troubleshooting/ironprint-macos-net8-apple-silicon/ The article "IronPrint on macOS with .NET 8 (Apple Silicon)" addresses build or runtime errors encountered when running IronPrint in a .NET 8 console application on Apple Silicon macOS. IronPrint has native cross-platform support for Windows, macOS, iOS, and Android via its `IronSoftware.System.Drawing` dependency, so these errors are not caused by a missing native library. Instead, the root cause is usually the project's `TargetFramework`: `ShowPrintDialog`/`ShowPrintDialogAsync` require a UI-capable target framework (such as `net7.0-maccatalyst` or `net7.0-macos`) to render the dialog, since these are not part of the default console app templates. If a dialog isn't required, `Printer.Print`/`Printer.PrintAsync` can send a document straight to a printer without this requirement. The article walks through configuring a UI-capable `TargetFramework` and calling `Printer.ShowPrintDialogAsync(string, PrintSettings)` on macOS instead of relying on Windows-only printing paths. ### web.config License Setup: IronPrint | IronPrint https://ironsoftware.com/print/csharp/troubleshooting/license-key-web.config/ In the article "web.config License Setup: IronPrint" from IronPrint's documentation, users are guided on embedding their IronPrint license key into ASP.NET’s `web.config`, a solution addressing common setup errors. Previously, IronPrint versions before 2024.3.6 encountered issues where the license key stored in the `Web.config` file was not recognized, particularly in ASP.NET projects using .NET Framework version 4.6.2 or newer. This issue led to unhandled exceptions due to missing licenses. The article provides a workaround for these older versions, suggesting the use of `ConfigurationManager` in the code to retrieve and apply the license key from the `Web.config`. Users are instructed to store their license key in the `appSettings` section of the XML configuration file. The code example illustrates how to fetch this key using `ConfigurationManager.AppSettings` and assign it to the `IronPrint.License.LicenseKey` property, ensuring the application functions with the necessary licensing. This method effectively resolves the licensing issue until users upgrade to version 2024.3.6, where the problem has been addressed. The guide concludes by confirming that the license key application is successful, enhancing user experience and preventing operational disruptions. ### Print() Method Hangs in WPF and WinForms https://ironsoftware.com/print/csharp/troubleshooting/print-method-hangs-wpf-winforms/ The article addresses a common issue faced when using the synchronous `Print()` method in WPF and WinForms applications. This method often results in the UI freezing because it blocks the main application thread indefinitely, despite valid print jobs. This is expected behavior: `Print()` is intentionally synchronous and blocks the calling thread until the print job completes, so calling it from a WPF or WinForms UI thread freezes the UI — it is not caused by a conflict or defect in IronPrint's print pipeline. The recommended solution is to switch to using the asynchronous `PrintAsync()` method. By employing `PrintAsync()`, the print operation is moved off the blocking path, allowing the application to remain responsive while the print job is processed. It emphasizes best practices such as preferring async APIs, avoiding blocking calls on the main thread (such as `.Result` or `.Wait()`), and offloading long-running I/O operations to background or asynchronous tasks to prevent UI deadlocks. By adhering to these guidelines, developers can ensure smoother and more efficient printing operations in their WPF and WinForms applications. ### ShowPrintDialog Behavior on Unsupported Target Frameworks https://ironsoftware.com/print/csharp/troubleshooting/showprintdialog-behavior/ `ShowPrintDialog` and `ShowPrintDialogAsync` require a UI component to display a print dialog, and are not supported on target frameworks that lack UI capability, such as plain .NET Core or .NET Standard builds. Calling either method on an unsupported `TargetFramework` raises a `System.AggregateException` instructing the caller to use `Print`/`PrintAsync` instead, or to set a more specific OS-based `TargetFramework`. The fix is to build against a UI-capable target such as `net462`, `net472`, `net7.0-windows`, `net7.0-macos`, `net7.0-maccatalyst`, or `net7.0-android`. With one of these frameworks in place, `ShowPrintDialog` and `ShowPrintDialogAsync` display the dialog as expected. ## Product Updates ### IronPrint Product Changelog | IronPrint https://ironsoftware.com/print/csharp/product-updates/changelog/ The IronPrint Product Changelog page provides a comprehensive overview of updates and enhancements to the IronPrint software, a robust printing library designed for .NET applications. IronPrint is engineered to deliver a seamless printing experience, continuously evolving based on user feedback and feature requests. The updates chronicle a series of monthly releases from January 2024 through June 2025, highlighting new features, performance improvements, and bug fixes. Notably, recent updates include enhancements such as improved PDF printing speed by 30% on Windows, significant spooling performance improvements for large PDFs, and fixes for issues like blurry prints from WPF. Additionally, updates frequently incorporate new versions of IronSoftware.System.Drawing, ensuring compatibility and performance enhancements. The changelog emphasizes IronPrint’s commitment to its community by integrating feedback and evolving the product to meet user needs, supporting a variety of platforms including Windows, macOS, iOS, and Android, and project types such as web, mobile, and desktop. The page serves as a valuable resource for developers looking to integrate and optimize printing functionalities within their C# applications using IronPrint. Links to relevant version downloads and API references are provided for further exploration.