title: uiWebView printing a pdf
body: <p>Inside of uiwebview, what is a good way print a pdf document?</p>
  
  <p>The pdf is accessible via a url or it can be loaded inside of an iframe.  </p>
  
  <p>Using the standard javascript widnow.print() functions will not work.  </p>
  
  <p>I am considering using a javascript bridge such as:</p>
  
  <pre><code>- (BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType {
      NSURL *URL = [request URL]; 
  
      if ([[URL scheme] isEqualToString:@"native"]) { 
          NSString *urlString = [[request URL] absoluteString];
          NSArray *urlParts = [urlString componentsSeparatedByString:@":"];
          NSString *cmd = [urlParts objectAtIndex:1];
  
          if ( [cmd isEqualToString:@"printPdf"] ) {
              //  [self dosomething];
          }
      }
      return YES;
  }
  </code></pre>
  
  <p>At this point I need some sort of xcode function which accept a path to the pdf and send it the airPrinter.</p>
  
  <p>Is this a good approach?  I am searching examples of how to print a pdf inside a uiWebView.</p>