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



    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:

    <FONT size=2>

    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>If</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Not</FONT></FONT><FONT size=2> grd </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Is</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Nothing</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Then

    </FONT></FONT><FONT size=2>

    printset.Preview = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>True

    </FONT></FONT><FONT size=2>

    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 = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>True

    </FONT></FONT><FONT size=2>

    printset.ShowPrintDialog = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>True

    </FONT></FONT><FONT size=2>

    grd.Sheets(0).PrintInfo = printset


    Can anyone tell me why this is happening?


    Thanking you in advance


  • Replied 8 September 2017, 1:59 pm EST


    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

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



Need extra support?

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

Learn More

Forum Channels