title: PDF not shown correctly
body: <p>In my app I use a window with a single PDF view for showing some information. When the window is shown first the display is fine:</p>
  
  <p><a href="https://i.stack.imgur.com/l29oY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/l29oY.png" alt="enter image description here"></a></p>
  
  <p>But when showing it once again the PDF inside is shifted:</p>
  
  <p><a href="https://i.stack.imgur.com/i85M9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/i85M9.png" alt="enter image description here"></a></p>
  
  <p>The code for opening the window is this:</p>
  
  <pre><code>- (IBAction)viewClicked:(id)sender {
    NSData* data = [NSData dataWithContentsOfFile:@"my.pdf"];
    pdf = [[PDFDocument alloc] initWithData:data];
    [_pdfWindow makeKeyAndOrderFront:self];
    _pdfView.document = pdf;
  }
  </code></pre>
  
  <p>This is called right after the app starts. The window is closed with the red close button. Right after that the above <code>viewClicked</code> is repeated and shows the shifted picture.</p>
  
  <p>The same happens in Swift:</p>
  
  <pre><code>@IBAction func viewClicked(_ sender: Any) {
    let data = NSData(contentsOfFile:"my.pdf")
    pdf = PDFDocument(data:data as! Data)
    pdfWindow.makeKeyAndOrderFront(self)
    pdfView.document = pdf
  }
  </code></pre>
  
  <p><strong>Edit</strong> One further observation: cursor right, which is propagated to the PDFView directly, when issued from the wrong display results in this:</p>
  
  <p><a href="https://i.stack.imgur.com/rV3B3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rV3B3.png" alt="enter image description here"></a></p>
  
  <p>which is only the 2nd page of the PDF.</p>
  
  <p><strong>Edit2</strong> If anyone is interested, I attach the ObjC/Swift XCode projects. You just need to adapt the PDF file location in AppDelegate. <a href="https://dl.dropboxusercontent.com/u/66691423/Archiv.zip" rel="nofollow noreferrer">Dropbox</a></p>