This topic describes how to use the advanced operations to scale the document window and set autofit for the view when you use a PDF document.
Obtain and set the scale of a document window
Syntax
Expression. ActivePDF.ZoomExpression: the document type application object.
Return value
Returns a
numberthat represents the scale of the document window.Example
async function example() { await instance.ready(); const app = instance.Application; // Obtain the scale of the document window. const result = await app.ActivePDF.Zoom; console.log(result); // Set the scale of the document window. app.ActivePDF.Zoom = 66; }
Set autofit for the view
Set whether to enable autofit for the view to fit the document window after the document window is resized.
Syntax
Expression.ActivePDF.ZoomToFit = NumberExpression: the document type application object.
Valid values of
Number:-1: enables autofit for the view.
0: does not enable autofit for the view.
Example
async function example() { await instance.ready(); const app = instance.Application; // Do not enable autofit for the view. app.ActivePDF.ZoomToFit = 0; }
该文章对您有帮助吗?