Zooming

Manual Zooming

You can use -[PSPDFDocumentViewController zoomToPDFRect:forPageAtIndex:animated:] to zoom to a specific rect inside a page of the current document.

Note: This method's rect needs to be specified in pdf coordinates.

Disable Zooming

Zooming can be disabled by setting maximumZoomScale of PSPDFConfiguration to 1. It's important to set this value before creating the view. Alternatively you can set zoomEnabled to NO on PSPDFDocumentViewController

1
2
3
let controller = PSPDFViewController(document: document, configuration: PSPDFConfiguration { builder in
    builder.maximumZoomScale = 1
})
Copy
1
2
3
PSPDFViewController *controller = [[PSPDFViewController alloc] initWithDocument:document configuration:[PSPDFConfiguration configurationWithBuilder:^(PSPDFConfigurationBuilder *builder) {
    builder.maximumZoomScale = 1.0f;
}]];