When loading the PDF
in a QLPreviewController
, it does not fit the content that I have inside, I am adding it as a subview to a container view. The PDF
has a greater zoom than required. Is there any way to modify the zoom of QLPreview
?
let preview = QLPreviewController()
preview.dataSource = self
preview.navigationController?.isNavigationBarHidden = true
addChild(preview)
termsConditionsContainer.addSubview(preview.view)
termsConditionsContainer.backgroundColor = .white
preview.view.translatesAutoresizingMaskIntoConstraints = false
preview.view.topAnchor.constraint(equalTo: termsConditionsContainer.topAnchor).isActive = true
preview.view.leftAnchor.constraint(equalTo: self.termsConditionsContainer.leftAnchor).isActive = true
preview.view.widthAnchor.constraint(equalTo: self.termsConditionsContainer.widthAnchor).isActive = true
preview.view.bottomAnchor.constraint(equalTo: termsConditionsContainer.bottomAnchor).isActive = true
preview.didMove(toParent: self)