[]
Represents the page setup description.
public interface IPageSetup
Returns True to align the header and the footer with the margins set in the page setup options.
bool AlignMarginsHeaderFooter { get; set; }
Gets or sets whether column widths are adjusted to fit the longest text width for printing. May cause some efficiency problems if the file contains large amounts of data.
bool BestFitColumns { get; set; }
Gets or sets whether row heights are adjusted to fit the tallest text height for printing. May cause some efficiency problems if the file contains large amounts of data.
bool BestFitRows { get; set; }
True if elements of the document will be printed in black and white.
bool BlackAndWhite { get; set; }
Returns or sets the size of the bottom margin, in points.
double BottomMargin { get; set; }
Center aligns the footer information in the PageSetup object.
string CenterFooter { get; set; }
Returns a IGraphic object that represents the picture for the center section of the footer. Used to set attributes about the picture.
IGraphic CenterFooterPicture { get; }
Center aligns the header information in the PageSetup object.
string CenterHeader { get; set; }
Returns a IGraphic object that represents the picture for the center section of the header. Used to set attributes about the picture.
IGraphic CenterHeaderPicture { get; }
True if the sheet is centered horizontally on the page when it's printed.
bool CenterHorizontally { get; set; }
True if the sheet is centered vertically on the page when it's printed.
bool CenterVertically { get; set; }
True if a different header or footer is used on the first page.
bool DifferentFirstPageHeaderFooter { get; set; }
True if the sheet will be printed without graphics.
bool Draft { get; set; }
Returns the alignment of text on the even IPage of a workbook or section.
IPage EvenPage { get; }
Returns the alignment of text on the first IPage of a workbook or section.
IPage FirstPage { get; }
Returns or sets the first page number that will be used when this sheet is printed. If Automatic, Document Solutions for Excel chooses the first page number. The default is Automatic.
int FirstPageNumber { get; set; }
Returns or sets the number of pages tall the worksheet will be scaled to when it's printed. Applies only to worksheets.
int FitToPagesTall { get; set; }
Returns or sets the number of pages wide the worksheet will be scaled to when it's printed. Applies only to worksheets.
int FitToPagesWide { get; set; }
Returns or sets the size of the footer margin, in points.
double FooterMargin { get; set; }
Returns or sets the size of the header margin, in points.
double HeaderMargin { get; set; }
Represents whether the first page number is automatically assigned. The default is true. When the first page number is specified, it would be set to false.
bool IsAutoFirstPageNumber { get; set; }
If this property is False, the FitToPagesWide and FitToPagesTall properties control how the worksheet is scaled.
bool IsPercentScale { get; set; }
Returns or sets the alignment of text on the left footer of a workbook or section.
string LeftFooter { get; set; }
Returns a IGraphic object that represents the picture for the left section of the footer. Used to set attributes about the picture.
IGraphic LeftFooterPicture { get; }
Returns or sets the alignment of text on the left header of a workbook or section.
string LeftHeader { get; set; }
Returns a IGraphic object that represents the picture for the left section of the header. Used to set attributes about the picture.
IGraphic LeftHeaderPicture { get; }
Returns or sets the size of the left margin, in points.
double LeftMargin { get; set; }
True if the specified PageSetup object has different headers and footers for odd-numbered and even-numbered pages.
bool OddAndEvenPagesHeaderFooter { get; set; }
Returns or sets a Order value that represents the order uses to number pages when printing a large worksheet.
Order Order { get; set; }
Returns or sets a PageOrientation value that represents the portrait or landscape printing mode.
PageOrientation Orientation { get; set; }
Represents the height in inches of the paper, considered page orientation.
double PaperHeight { get; }
Returns or sets the size of the paper.
PaperSize PaperSize { get; set; }
Represents the width in inches of the paper, considered page orientation.
double PaperWidth { get; }
Returns or sets the range to be printed, as a string using A1-style references in the language of the macro.
string PrintArea { get; set; }
Returns or sets the way comments are printed with the sheet.
PrintLocation PrintComments { get; set; }
Gets or sets number of copies to print.
int PrintCopies { get; set; }
Returns or sets an PrintErrors contstant specifying the type of print error displayed. This feature allows users to suppress the display of error values when printing a worksheet.
PrintErrors PrintErrors { get; set; }
True if cell gridlines are printed on the page. Applies only to worksheets.
bool PrintGridlines { get; set; }
True if row and column headings are printed with this page. Applies only to worksheets.
bool PrintHeadings { get; set; }
True if cell notes are printed as end notes with the sheet. Applies only to worksheets.
bool PrintNotes { get; set; }
Gets or sets range of pages to print, the numbers or page ranges are separated by commas counting from the beginning of the document. For example, type "1,3,5-12".
string PrintPageRange { get; set; }
Returns or sets a PrintQuality value that represents the print quality of this page. Default is 600 dpi.
PrintQuality PrintQuality { get; set; }
Returns or sets the columns that contain the cells to be repeated on the right side of each page, as a string in A1-style notation in the language of the macro.
string PrintTailColumns { get; set; }
Returns or sets the rows that contain the cells to be repeated at the bottom of each page, as a string in A1-style notation in the language of the macro.
string PrintTailRows { get; set; }
Returns or sets the columns that contain the cells to be repeated on the left side of each page, as a string in A1-style notation in the language of the macro.
string PrintTitleColumns { get; set; }
Returns or sets the rows that contain the cells to be repeated at the top of each page, as a string in A1-style notation in the language of the macro.
string PrintTitleRows { get; set; }
Returns or sets the distance (in points) between the right edge of the page and the right boundary of the footer.
string RightFooter { get; set; }
Returns a IGraphic object that represents the picture for the right section of the footer. Used to set attributes of the picture.
IGraphic RightFooterPicture { get; }
Returns or sets the right part of the header.
string RightHeader { get; set; }
Returns a IGraphic object that represents the picture for the right section of the header. Used to set attributes of the picture.
IGraphic RightHeaderPicture { get; }
Returns or sets the size of the right margin, in points.
double RightMargin { get; set; }
Returns or sets if the header and footer should be scaled with the document when the size of the document changes.
bool ScaleWithDocHeaderFooter { get; set; }
Returns or sets the size of the top margin, in points.
double TopMargin { get; set; }
Returns or sets a Variant value that represents a percentage (between 10 and 400 percent) by which Document Solutions for Excel will scale the worksheet for printing.
int Zoom { get; set; }
Sets the custom paper size, in unit of inches.
void CustomPaperSize(double width, double height)
width
doubleheight
doubleGenerate page setup from the JSON string.
void FromJson(string json)
json
stringThe JSON string representing the page setup.
Generate the JSON string from page setup.
string ToJson()
The JSON string representing the page setup.