title: Is there a way to add extra margin space to a page in PDFKit/PDFView?
body: <p>This is perhaps a more general question as I'm looking for ideas on how to approach a problem working with PDFView/PDFKit.  I have a small sample application that allows you to display a page, select a range of text and then associate a comment with that text.  Once the comment is saved the comment is displayed on the PDFView page in the margin via an overridden draw() function for PDFView.</p>
  <p><a href="https://i.stack.imgur.com/ULxSd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ULxSd.png" alt="enter image description here" /></a></p>
  <p>Problem is that with very small margins the comments can be very squished.  I've been looking for a straight-forward solution and would very much appreciate ideas on how to address it.</p>
  <p>The obvious (ie, easy) solution is to change the actual &quot;page size&quot; in the PDFView and have wider margins, but of course PDFKit has no support for that (I don't think).  Another thought was to go to a custom PDFView library but the only ones I found when I last looked were iOS (not Cocoa) based.</p>
  <p>Last idea was to instead of drawing directly on the page have some sort of pop-up window (like a sticky-note) contain the note but then it would need to be moved dynamically with the scrolling of the page.  And of course one other was to recreate the PDF dynamically for viewing and make all the pages larger... but I've not dug into how much of a performance hit / effort that would entail.</p>
  <p>Maybe there's a simple/obvious solution that I've missed?</p>
  <p>I created a simple sample app in gitHub which shows the basic functionality for people to play with if that's of help.  <a href="https://github.com/jcnolan/PDFMarginTextView" rel="nofollow noreferrer">https://github.com/jcnolan/PDFMarginTextView</a></p>