Description
Sets the page size of the PDFPage object.
Applies to
Syntax
SetPageSize(double width, double height)
SetPageSize(PDFPageSize PageSize)
|
Argument |
Description |
|---|---|
|
height |
The height of the page of the PDFPage object. The unit is point (pt). |
| width | The width of the page of the PDFPage object. The unit is point (pt). |
| PageSize |
A value of the PDFPageSize enumerated datatype specifying the standard page sizes. Values are:
The following page sizes are not included in PDFPageSize. You need to manually specify the page width and height:
|
Return value
None.
Usage
Call the function to set the page size of the PDFPage object.
Examples
This example creates a PDFPage, sets its size, and adds it to a PDF document.
PDFpage lpdf_page
PDFdocument lpdf_doc
PDFtext lpdf_text
lpdf_page = create PDFpage
lpdf_doc = create PDFdocument
lpdf_text = create PDFtext
lpdf_page.setsize(PDFPage_A4!)
lpdf_text.content = "text content"
lpdf_page.addcontent(lpdf_text)
lpdf_doc.addpage(lpdf_page)
lpdf_doc.save("D:\addcontent.pdf")
See also


