easyPDF SDK Usermanual
PDF Creator Programming API  |  Download Free Trial  |  Contact Us to Purchase

PrinterResultMessage Property

Gets printer driver printing result in string format. Please see PrinterResult for more information.

string PrinterResultMessage { get; }
Property PrinterResultMessage As String ' ReadOnly
def getPrinterResultMessage(self)
String getPrinterResultMessage() throws PrinterException
function getPrinterResultMessage() 
BclPrnResult GetPrinterResultMessage(BclPrinter* pPrinter, wchar_t** poutVal);
Property PrinterResultMessage As String ' ReadOnly


String (read-only)


If error is not raised during PDF conversion, you do not need to check this property.

Example Usage

On Error goto Function_Err

Set oPrinter = CreateObject("easyPDF.Printer.8")
Set oPrintJob = oPrinter.PrintJob
oPrintJob.PrintOut "C:\test\input.doc", "C:\test\output.pdf"

    Exit Function

    ' Get error message
    MsgBox Err.Description

    ' Look at the error number
    If Err.Number = PRN_R_CONVERSION_FAILED Then
        ' More detailed error message
        MsgBox "Conversion Result: " + oPrintJob.ConversionResultMessage

        ' See if we have error message from printer driver
        nResult = oPrintJob.ConversionResult
        If nResult = PRN_CR_CONVERSION Or _
           nResult = PRN_CR_CONVERSION_INIT Or _
           nResult = PRN_CR_CONVERSION_PRINT Then
            ' Error message from printer driver
            MsgBox "Printer Result: " + oPrintJob.PrinterResultMessage

            ' You can also get the result in integer form
            nPrinterResult = oPrintJob.PrinterResult
        End If
    End If

    Resume Function_End

Example Usage (C#)

Printer printer = new Printer();
   printer.PrintJob.PrintOut(@"c:\test\input.docx", @"c:\test\output.pdf");
catch(System.Runtime.InteropServices.COMException err)
   // Get the error message
   MessageBox.Show(string.Format("Error: {0} ({1})", err.Message, err.ErrorCode));
   if(err.ErrorCode == (int)prnResult.PRN_R_CONVERSION_FAILED)
      // More detailed error message
      MessageBox.Show(string.Format("Conversion Result: {0} ({1})", printer.PrintJob.ConversionResultMessage, printer.PrintJob.ConversionResult));

      // See if we have error message from printer driver
         case prnConversionResult.PRN_CR_CONVERSION:
         case prnConversionResult.PRN_CR_CONVERSION_INIT:
         case prnConversionResult.PRN_CR_CONVERSION_PRINT:
            // Error message from printer driver
            MessageBox.Show(string.Format("Printer Result: {0} ({1})", printer.PrintJob.PrinterResultMessage, printer.PrintJob.PrinterResult));