UIWebView在UIWebView上出色地显示了pdf。
CGRect screenRect = [[UIScreen mainScreen] bounds];
CGFloat screenWidth = screenRect.size.width;
CGFloat screenHeight = screenRect.size.height;
webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, screenWidth, screenHeight)];
webView.delegate = self;
NSURL *targetURL = [[NSBundle mainBundle] URLForResource:@"document" withExtension:@"pdf"];
NSURLRequest *request = [NSURLRequest requestWithURL:targetURL];
[webView loadRequest:request];
[self.view addSubview:webView];然而,当它不能显示带有电子签名的pdf (我从http://www.tecxoft.com/samples/sample01.pdf获得)时,事情开始变得有些烦人:

但是,在打印预览中,它能够在右上角显示电子签名(这只适用于iOS 10,而不适用于iOS9):

问题:
是否可以选择显示带有签名的pdf?
我尝试过UIWebView和UIDocumentationInteractionController,但它仍然没有显示签名。
发布于 2016-10-31 04:00:54
只需将pdf平平后,才能在网页上显示出来。
https://stackoverflow.com/questions/40328594
复制相似问题