Search code examples
c#.netprintingironpdf

Iron PDF network print takes more time when compared to regular Adobe print


We are using Iron PDF to print PDF documents that's stored as varbinary in the database. We tried to compare the timing between printing from windows application using Iron PDF vs. printing an actual physical PDF file (same # of pages); the line Print() actually takes ~45 seconds to finish, while regular print from file using Adobe takes 3-5 seconds.

public static bool PrintPDF(byte[] fileContent)
{
    if (fileContent != null && fileContent.Length > 0)
    {
        try
        {
            PdfDocument pdfDocument = new(fileContent);
            pdfDocument.Print();
            return true;
        }
        catch (Exception ex)
        {
            //handle exception
        }
    }
    return false;
}

Any suggestions on how to improve the printing speed?

Thanks


Solution

  • Contacted tech support, and they suggested passing the DPI value to the print method. Seems to be faster now; it takes 7-12 seconds.

    pdfDocument.Print(150);