title: Rotate a PDF from InAppBrowser
body: <p>So I was able to integrate <a href="http://github.com/cemerson/cordova-inappbrowser-ce" rel="nofollow">InAppBrowser-CE</a> this plugin which works amazingly to display PDF's from a specified window size and give transparency, but now I am trying to figure out how to rotate the PDF. I want to add a rotation tool (similar to the photo library in iOS) but dont know where to start at. I saw something about image rotation tool, but wasnt sure if it applied to a pdf file, and I don't want to keep at something that doesn't work (i.e. using iFrame instead of InAppBrowser to display PDFs) any help is much appreciated. Here is just a sample of how the PDF is called to give you some insight.</p>
  
  <p>This is from HTML to call it to open: </p>
  
  <pre><code> &lt;button onclick="window.open('http://www.free.woodworking-plans.org/images/ranch-house-7161/ranch-house-floor-plan-o.jpg','_blank','vw=685,vh=650,vx=40,vy=40');"&gt;Change my size&lt;/button&gt;
  </code></pre>
  
  <p>And here is how the PDF is opened (from xcode CDVInAppBrowser.m) </p>
  
  <pre><code>- (void)openInInAppBrowser:(NSURL*)url withOptions:(NSString*)options
  {
  
      if (self.inAppBrowserViewController == nil) {
          NSString* originalUA = [CDVUserAgentUtil originalUserAgent];
          self.inAppBrowserViewController = [[CDVInAppBrowserViewController alloc] initWithUserAgent:originalUA prevUserAgent:[self.commandDelegate userAgent]];
          self.inAppBrowserViewController.navigationDelegate = self;
  
          if ([self.viewController conformsToProtocol:@protocol(CDVScreenOrientationDelegate)]) {
              self.inAppBrowserViewController.orientationDelegate = (UIViewController &lt;CDVScreenOrientationDelegate&gt;*)self.viewController;
          }
      }
  
      // set pointer to this viewcontroller for later use
      iabvc = self.inAppBrowserViewController;
  
      CDVInAppBrowserOptions* browserOptions = [CDVInAppBrowserOptions parseOptions:options];
      [self.inAppBrowserViewController showLocationBar:browserOptions.location];
      [self.inAppBrowserViewController showToolBar:browserOptions.toolbar];
  </code></pre>
  
  <p>....</p>
  
  <pre><code>- (id)initWithUserAgent:(NSString*)userAgent prevUserAgent:(NSString*)prevUserAgent
  {
      self = [super init];
  
      if (self != nil) {
          _userAgent = userAgent;
          _prevUserAgent = prevUserAgent;
          _webViewDelegate = [[CDVWebViewDelegate alloc] initWithDelegate:self];
  
          [self createViews];
      }
  
      return self;
  }
  </code></pre>
  
  <p>And here is what the tools section looks like,</p>
  
  <pre><code>self.toolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0.0, (self.view.bounds.size.height - TOOLBAR_HEIGHT), self.view.bounds.size.width, TOOLBAR_HEIGHT)];
      self.toolbar.alpha = 1.000;
      self.toolbar.autoresizesSubviews = YES;
      self.toolbar.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleTopMargin;
      self.toolbar.barStyle = UIBarStyleBlackOpaque;
      self.toolbar.clearsContextBeforeDrawing = NO;
      self.toolbar.clipsToBounds = NO;
      self.toolbar.contentMode = UIViewContentModeScaleToFill;
      self.toolbar.contentStretch = CGRectFromString(@"{{0, 0}, {1, 1}}");
      self.toolbar.hidden = NO;
      self.toolbar.multipleTouchEnabled = NO;
      self.toolbar.opaque = NO;
      self.toolbar.userInteractionEnabled = YES;
  </code></pre>