0

UIWebView displays pdf on UIWebView splendidly.

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];

However, things starts to get a little irritating when it can't display a pdf with e-signature (I got it from http://www.tecxoft.com/samples/sample01.pdf):

enter image description here

However, in print preview it's able to show the e-signature at the top right corner (this only works on iOS 10 and not iOS9):

enter image description here

Question:

Any alternative to display pdf with signature?

I've tried both UIWebView and UIDocumentationInteractionController and it still doesn't display the signature.

user1872384
  • 6,886
  • 11
  • 61
  • 103

1 Answers1

0

Just need to flatten the pdf before displaying it on the webview.

user1872384
  • 6,886
  • 11
  • 61
  • 103