How to skip printing for 1 sheet when printing whole fpspread ?

Posted by: wilfried-fp on 8 September 2017, 2:50 pm EST

  • Posted 8 September 2017, 2:50 pm EST

    I have to print the whole spreadsheet to a pdf using fpSpread.PrintSheet(-1). But one of the sheetviews is invisible and shall not be printed. It always prints an empty page for this sheet. (The sheet contains only one cell with a user defined cell editor containing a browser).


    I tried to set the printinfo for this sheet to nothing, but it then tried to print to a printer.


    How can I skip printing of one or several sheets ? (But with use of fpSpread.PrintSheet(-1) because of page counting and other reasons).


    Thanks, Wilfried


     


     


     

  • Replied 8 September 2017, 2:50 pm EST

    Hello,

    I was not able to replicate the issue at my end. When I printed a Spread with some hidden sheets to pdf, no empty pages were created in the pdf file. I am attaching a sample that depicts the same. I would request you to provide me a sample depicting your issue, so that I can debug it further. I would also like to know which version of Spread are you currently using.

    Thanks,

    Manpreet Kaur.


    2011/12/printtopdf.zip
  • Replied 8 September 2017, 2:50 pm EST

    Hello,


    see attached 2 versions of code (printing to pdf).


    noPrintInfo.txt:  Sheet "situationsskizze" is set to not visible, Printinfo property is not set, effect:   Sheet "situationsskizze" is printed to the default printer !
    (empty page, because sheet contains only 1 cell with userCelltype (webbrowser) which shows tzhe content only in edit mode)


    SamePrintInfo.txt:  Sheet "situationsskizze" is set to not visible, Printinfo property is set like for the other sheets, effect:   Sheet "situationsskizze" is printed to the pdf
    (empty page, because sheet contains only 1 cell with userCelltype (webbrowser) which shows tzhe content only in edit mode)


    If printinfo is set to Nothing, Sheet "situationsskizze" is printed to the default printer.


    Version  of Farpoint.Win.Spread: 5.0.3505.2008


    Runtime version of Farpoint.Win.Spread:  v2.0.50727


    2011/12/spreadPrint.zip
  • Replied 8 September 2017, 2:50 pm EST

    Hello,

    I was still not able to replicate the issue at my end. I am attaching a sample in which I tried to hide a sheet with one empty cell, but even on setting the PrintInfo object for all the sheets including even the hidden sheet, with all properties that you are using in your code, no empty pages were generated in the pdf file. I would request you to please modify the sample depicting your issue, so that I can debug it further.

    Thanks,

    Manpreet Kaur.


    2011/12/printtopdf-2.zip
Need extra support?

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

Learn More

Forum Channels