title: Scrolling PDF programmatically in UIWebView
body: <p>I wanna to scroll(down) on a UIWebView(iPad Application), where I will display a local pdf file, programmatically.
  I have added a UIWebView with the interface builder and linked it.</p>
  
  <pre><code>@interface ViewController : UIViewController &lt;UIWebViewDelegate&gt;
  
  @property (weak, nonatomic) IBOutlet UIWebView *webView;
  
  @end
  </code></pre>
  
  <p>This is my code for getting the pdf file and scrolling. The webViewDidFinishLoad function gets called.</p>
  
  <pre><code>@synthesize webView = _webView;
  
  - (void)viewDidLoad
  {
      [super viewDidLoad];
  
      NSString *path = [[NSBundle mainBundle] pathForResource:@"test" ofType:@"pdf"];
      NSURL *targetURL = [NSURL fileURLWithPath:path];
      NSURLRequest *request = [NSURLRequest requestWithURL:targetURL];
  
      self.webView.delegate = self;
      [self.webView loadRequest:request];
  }
  
  #pragma mark - UIWebViewDelegate
  
  - (void)webViewDidFinishLoad:(UIWebView *)webView
  {
      NSLog(@"didLoad");
  
      self.webView.scrollView.contentOffset = CGPointMake(0, 500);
  }
  </code></pre>
  
  <p>I am using the iOS SDK 6.1, the iOS deployment target is also 6.1.</p>
  
  <p>Heres the log:</p>
  
  <pre><code>2013-04-23 09:23:08.742 PDFViewer[3834:c07] DiskImageCache: Could not resolve the absolute path of the old directory.
  2013-04-23 09:23:08.913 PDFViewer[3834:c07] didLoad
  </code></pre>
  
  <p>The UIWebView isn't scrolling. The pdf is still at the first page.</p>