Print Preview Print Button not working

Posted by: antoniog-fp on 8 September 2017, 1:59 pm EST

  • Posted 8 September 2017, 1:59 pm EST

    Hi


     


    When I click the printer button when viewing my pdf file in Print Preview, nothing happens - ie no printer selection dialogue and nothing is printed to the printer. Here is the code I am using:


    If Not grd Is Nothing Then


    printset.Preview = True


    printset.PdfWriteMode = FarPoint.Win.Spread.PdfWriteMode.[New]


    printset.PdfWriteTo = FarPoint.Win.Spread.PdfWriteTo.File


    printset.PdfFileName = m_strFileName


    printset.PrintType = FarPoint.Win.Spread.PrintType.All


    printset.PrintToPdf = True


    printset.ShowPrintDialog = True


    grd.Sheets(0).PrintInfo = printset


    grd.PrintSheet(0)


    Can anyone tell me why this is happening?


     


    Thanking you in advance


    AntonioG

  • Replied 8 September 2017, 1:59 pm EST

    Hello,

    I used the follofowing code to get print preview and I see that it prints with no problem using the print button on the preview page,

            Dim printset As New FarPoint.Win.Spread.PrintInfo()
            printset.ShowPrintDialog = True
            printset.Preview = True
            FpSpread1.Sheets(0).PrintInfo = printset
            FpSpread1.PrintSheet(0)

     We might need to give two different commands for these two functions(Printing to PDF & setting up the Preview).

    Thanks,

     

Need extra support?

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

Learn More

Forum Channels