title: iOS 11 PDFKit Ink annotation - cannot fill UIBezierPath
body: <p>I'm adding ink annotations to PDFDocument using the PDFAnnotation() class with subtype ink. The idea is to capture signatures that are drawn using touch.</p>
  
  <p>Inspired by UberSignature my UIBezierPath is a series of rectangles that are supposed to be filled with a color. However, when I add the annotation to the PDFDocument it is not filled.</p>
  
  <p>It seems the UIBezierPath's fill() method does nothing at all when added to a PDFAnnotation?</p>
  
  <p>If I use the same UIBezierPath and draw it on an UIImage it is correctly filled with a solid color.</p>
  
  <p>Any ideas on what could be wrong?</p>
  
  <p>Problematic code:</p>
  
  <pre><code>UIColor.red.setStroke()
  UIColor.red.setFill()
  
  var path = UIBezierPath()
  path.append(myRectangles)
  path.fill()
  
  var annotation = PDFAnnotation(bounds: path.bounds, forType: .ink, withProperties: nil)
  annotation.add(path)
  myPDFPage.addAnnotation(annotation)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/HrsY9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HrsY9.png" alt="Current view of PDF"></a></p>
  
  <p>In the screenshot I have tried to write normal text, and two example lines. The line on the left is drawn slowly, the line on the right is drawn fast. The idea is to have width of the line vary according to the speed it is drawn to make a signature look more natural/realistic.</p>