GrapeCity Forums

The GrapeCity Message Boards
Welcome to GrapeCity Forums Sign in | Join | Help
in Search

Export to PDF in Version 4

Last post 07-03-2009, 11:37 AM by Jai. 3 replies.
Sort Posts: Previous Next
  •  06-29-2009, 10:44 PM 79634

    Export to PDF in Version 4

    Hi,

    I have upgraded from Version 3 to Version 4 and it resolved many issues which i was facing previously.

    Now i want to know how can i remove "Row Headers" and "Column Headers" when i  export file to PDF.

    Currently when i am using method SavePdfToResponse that is working perectly correct but the output contains "Row and Column Headers" in the exported file.

    I do not want row and column headers in exported output. How can i achieve that?

    Jai

     

  •  06-30-2009, 3:10 AM 79638 in reply to 79634

    Re: Export to PDF in Version 4

    Hello Jai, 

    The export to pdf uses the default flag of SaveAsViewed. Thus, before calling the SavePdfToResponse method, you may set the FpSpread1.ActiveSheetView.ColumnHeader.Rows[0].Visible = false; and set it to true after calling the SavePdfToResponse method. 

    Regards, 


    Scott S.
    Product Manager, Spread ASP.NET
    GrapeCity FarPoint
  •  06-30-2009, 10:36 AM 79676 in reply to 79638

    Re: Export to PDF in Version 4

    In addition, you may also use the PrintInfo class on every sheet and specify the settings to hide the Column and Row Headers. Below is the code snippet: 

            PrintInfo pi = new PrintInfo();

            pi.ShowColumnHeader = PrintHeader.Hide;

            pi.ShowRowHeader = PrintHeader.Hide;

            FpSpread1.Sheets[0].PrintInfo = pi;

            FpSpread1.SavePdf(0,@"c:\abc.pdf");

    Regards, 


    Scott S.
    Product Manager, Spread ASP.NET
    GrapeCity FarPoint
  •  07-03-2009, 11:37 AM 79833 in reply to 79676

    Re: Export to PDF in Version 4

    Hi Harish,

    Thanks a lot for the code.

    Both the codes work properly and as aspected.

    Thanks for resolving the issue in mean time.

    Regards,

    Jai.

View as RSS news feed in XML
     FarPoint Forums Home