GetPageSize
PowerScript function
Description
Gets the size of the specified page in a PDF document.
Applies to
PDFDocExtractor object in Objects and Controls
Syntax
|
1 |
long GetPageSize(long index, ref long width, ref long height) |
|
Argument |
Description |
|---|---|
|
index |
The index of the page. |
|
width |
The width of the page at the index. |
|
height |
The height of the page at the index. |
Return value
Long. Returns 1 if it succeeds and -1 if it fails. For more errors,
see the Error Codes.
Examples
This example gets the size of the first page in the
extract.pdf.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
PDFdocument lpdf_doc PDFpage lpdf_page long ll_open,index double ll_width,ll_height PDFDocExtractor lpdf_docExt lpdf_docExt = create PDFDocExtractor lpdf_doc = create PDFdocument lpdf_page = create PDFpage ll_open = lpdf_docExt.open("extract.pdf" ) lpdf_docExt.getpagesize( 1,ll_width,ll_height ) //messagebox("Get the size of the first page:","width="+string(ll_width)+",height="+string(ll_height)) lpdf_docExt.close() lpdf_page.importcontent( "extract.pdf", 1, 100, 100, ll_width, ll_height) lpdf_doc.addpage( lpdf_page) lpdf_doc.save( "D:savegetPagesize.pdf") |
See also
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest