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.