public class PageSetup extends Object
Encapsulates info for page setup.
[C#] Pdf pdf1 = new Pdf(); pdf1.PageSetup.PageHeight = PageSize.A2Height; Section sec1 = pdf1.Sections.Add(); Text text1 = new Text(sec1,"this is text content"); text1.Margin.Top = 30; sec1.Paragraphs.Add(text1); pdf1.Save(...); [Visual Basic] Dim pdf1 As Pdf = New Pdf() pdf1.PageSetup.PageHeight = PageSize.A2Height Dim sec1 As Section = pdf1.Sections.Add() Dim text1 As Text = New Text(sec1, "this is text content") text1.Margin.Top = 30 sec1.Paragraphs.Add(text1) pdf1.Save(...) [XML] <?xml version="1.0" encoding="utf-8" ?> <Pdf xmlns="Aspose.Pdf"> <Section PageHeight="1684"> <Text MarginTop="30"> <Segment>this is text content</Segment> </Text> </Section> </Pdf>
Constructor and Description |
---|
PageSetup()
Initializes a new instance of the
PageSetup class. |
PageSetup(Section section)
Initializes a new instance of the
PageSetup class. |
Modifier and Type | Method and Description |
---|---|
Object |
deepClone()
Clones a new
PageSetup object. |
RectData |
getArtBox()
Gets or sets a
RectData object that indicates the art box of
the page. |
RectData |
getBleedBox()
Gets or sets a
RectData object that indicates the bleed box
of the page. |
RectData |
getCropBox()
Gets or sets a
RectData object that indicates the crop box of
the page. |
MarginInfo |
getMargin()
Gets or sets a
MarginInfo object that indicates the page
margin info. |
BorderInfo |
getPageBorder()
Gets or sets a
PageBorder object that indicates the page
border. |
MarginInfo |
getPageBorderMargin()
Gets or sets a
MarginInfo object that indicates the margin
between the page border and the page edge. |
PageGutter |
getPageGutter()
Gets or sets a
PageGutter object that indicates the page
gutter. |
float |
getPageHeight()
Gets or sets a float value that indicates the page height.
|
float |
getPageWidth()
Gets or sets a float value that indicates the page width.
|
com.aspose.ms.System.Drawing.SizeF |
getPhisicalAvailableSize(boolean isLandscape)
returns size of rectangle of page on screen or paper(i.e if page is
landscaped, width will be replaced with height)
|
RectData |
getTrimBox()
Gets or sets a
RectData object that indicates the trim box of
the page. |
void |
setArtBox(RectData value) |
void |
setBleedBox(RectData value) |
void |
setCropBox(RectData value) |
void |
setMargin(MarginInfo value) |
void |
setPageBorder(BorderInfo value) |
void |
setPageBorderMargin(MarginInfo value) |
void |
setPageGutter(PageGutter value) |
void |
setPageHeight(float value) |
void |
setPageWidth(float value) |
void |
setTrimBox(RectData value) |
public PageSetup()
Initializes a new instance of the PageSetup
class.
public PageSetup(Section section)
Initializes a new instance of the PageSetup
class.
section
- The section in which this PageSetup is used for.public MarginInfo getMargin()
Gets or sets a MarginInfo
object that indicates the page
margin info.
public void setMargin(MarginInfo value)
public float getPageWidth()
Gets or sets a float value that indicates the page width.
public void setPageWidth(float value)
public float getPageHeight()
Gets or sets a float value that indicates the page height.
public void setPageHeight(float value)
public RectData getCropBox()
Gets or sets a RectData
object that indicates the crop box of
the page.
public void setCropBox(RectData value)
public RectData getBleedBox()
Gets or sets a RectData
object that indicates the bleed box
of the page. The bleed box (PDF 1.3) defines the region to which the
contents of the page should be clipped when output in a production
environment. This may include any extra ��bleed area�� needed to
accommodate the physical limitations of cutting, folding, and trimming
equipment. The actual printed page may include printing marks that fall
outside the bleed box.
public void setBleedBox(RectData value)
public RectData getArtBox()
Gets or sets a RectData
object that indicates the art box of
the page. The art box (PDF 1.3) defines the extent of the page��s
meaningful content (including potential white space) as intended by the
page��s creator.
public void setArtBox(RectData value)
public RectData getTrimBox()
Gets or sets a RectData
object that indicates the trim box of
the page. The trim box (PDF 1.3) defines the intended dimensions of the
finished page after trimming. It may be smaller than the media box, to
allow for productionrelated content such as printing instructions, cut
marks, or color bars.
public void setTrimBox(RectData value)
public BorderInfo getPageBorder()
Gets or sets a PageBorder
object that indicates the page
border.
public void setPageBorder(BorderInfo value)
public MarginInfo getPageBorderMargin()
Gets or sets a MarginInfo
object that indicates the margin
between the page border and the page edge. The default value is half of
the page margin.
public void setPageBorderMargin(MarginInfo value)
public PageGutter getPageGutter()
Gets or sets a PageGutter
object that indicates the page
gutter.
public void setPageGutter(PageGutter value)
public Object deepClone()
Clones a new PageSetup
object.
PageSetup
object.public com.aspose.ms.System.Drawing.SizeF getPhisicalAvailableSize(boolean isLandscape)
returns size of rectangle of page on screen or paper(i.e if page is landscaped, width will be replaced with height)
Copyright © 2016 Aspose. All Rights Reserved.