我正在尝试在WKWebView内显示PDF文件,但是部分PDF文件被渲染模糊。有没有人找到解决方案?
self.webView = [[WKWebView alloc] initWithFrame:CGRectZero configuration:webViewConfiguration];
[self.view addSubview:self.webView];
[self.webView loadData:pdfData MIMEType:@"application/pdf" characterEncodingName:@"utf-8" baseURL:targetURL];
self.webView.translatesAutoresizingMaskIntoConstraints = NO;
[self.webView.leadingAnchor constraintEqualToAnchor:self.view.leadingAnchor].active = YES;
[self.webView.trailingAnchor constraintEqualToAnchor:self.view.trailingAnchor].active = YES;
[self.webView.topAnchor constraintEqualToAnchor:self.navBar.bottomAnchor].active = YES;
[self.webView.bottomAnchor constraintEqualToAnchor:self.view.bottomAnchor].active = YES;
在所附的屏幕截图中,您可以看到PDF数据的下半部分变得模糊不清。