PrintToPDF error: object instance not set to instance of object

Posted by: david.sheppard on 13 April 2022, 12:10 am EST

  • Posted 13 April 2022, 12:10 am EST

    I created a simple project with one Spread control. I put numbers in the first 10 rows and 5 columns. I get the error when I try to PrintSheet using the following code:

    Dim pi1 As New FarPoint.Win.Spread.PrintInfo

    pi1.PrintToPdf = True

    pi1.PdfFileName = FileNameWithPath

    FpSpread1.ActiveSheet.PrintInfo = pi1

    FpSpread1.PrintSheet(FpSpread1.ActiveSheet)

    A pdf file with zero length is created. I have tried using the newthread option and the only difference is that the error message pops up immediately instead of after the code ends running.

  • Posted 13 April 2022, 6:30 pm EST

    Hi David,

    Could you please share the sample replicating the issue, so that we can investigate this issue at our end?

    Regards

    Avnish

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels