pdf is showing like this in mac safari:
I am showing pdf files in safari but some of the pdf are showing broaderly i mean some of the content is hiding inside the screen if we scroll left to right or top to bottom then it in moving but not able to fit all pdf in safari. how to make pdf content fits in safari
how to show whole pdf in safari ? please guide
code:
@objc func ClkBtnView(sender: UIButton) {
if let strFilePath1 = self.dictCircularDetails?.filePath {
strFilePath = strFilePath1
strPrefix = strPrefix.imgPath1()
finalUrl = "(strPrefix)(strFilePath)"
guard let url = URL(string: finalUrl) else { return }
// Create a Safari View Controller
let safariViewController = SFSafariViewController(url: url)
// Create a UIBarButtonItem for the share button
let shareButton = UIBarButtonItem(barButtonSystemItem: .action, target: self, action: #selector(shareButtonTapped))
safariViewController.navigationItem.rightBarButtonItem = shareButton
// Present the Safari View Controller
present(safariViewController, animated: true, completion: nil)
}
}
o/p pdf in phone safari in below pic initially it is like empty just only showing one blue line if i scroll content left to right then moves
o/p after scrolling down then data is showing