Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

Excerpt

Sets or returns the area of the worksheet that will be printed. Content outside of this area will not be printed.

(This is not supported for charts.)

Signature
C#
C#
  public Area PrintArea{ get; set; }
Signature
vb.net
vb.net

Public Property PrintArea() As Area
Remarks

By default all of the content will be printed, and PrintArea will return an area covering the entire worksheet.

This property has no effect when rendering a worksheet to a PDF document.  If you wish to save only a specific area to the PDF document, use the Area.SavePdf method on the area you wish to save.

Example
Code Block
csharp
csharp
titleC#
            //--- Get PrintArea
          Area prntArea = ps.PrintArea;

          //--- Set PrintArea
          ps.PrintArea = prntArea;
        
Code Block
vb.net
vb.net
titlevb.net
            '--- Get PrintArea
          Dim prntArea As Area = ps.PrintArea

          '--- Set PrintArea
          ps.PrintArea = prntArea