title: UIMarkupTextPrintFormatter PDF creation with custom background and transparent HTML content
body: <p>I am using a <code>UIPrintPageRenderer</code> together with a <code>UIMarkupTextPrintFormatter</code> to print an html page which is rendered in a <code>UIWebView</code>. I am trying to achieve the following:
  I want to render the html content as a transparent layer onto the context but the background color of the html content is always white when rendered with the <code>UIPrintPageRenderer</code> in the context covering up all the content below.  </p>
  
  <p>The html style contains the following code snippet:</p>
  
  <pre><code>body {
        background-color: transparent !important;;
        -webkit-print-color-adjust: exact;
  }
  </code></pre>
  
  <p>In the <code>UIWebView</code> I can see that the background of the html is indeed transparent because I set the background of the <code>UIWebView</code> to a different color.</p>
  
  <p>This is the code I use for creating the PDF data:</p>
  
  <pre><code>let printPageRenderer = UIPrintPageRenderer()
  let printFormatter = UIMarkupTextPrintFormatter(markupText: htmlContent)
  printPageRenderer.addPrintFormatter(printFormatter, startingAtPageAt: 0)
  
  let data = NSMutableData()
  UIGraphicsBeginPDFContextToData(data, Constants.Pdf.rect, nil)
  let context = UIGraphicsGetCurrentContext()!
  
  for i in 0..&lt;printPageRenderer.numberOfPages {
      UIGraphicsBeginPDFPage()
  
      let backCoverView = UIView(frame: Constants.Pdf.rect)
      backCoverView.backgroundColor = UIColor(patternImage: UIImage(named: "background.png")!)
      backCoverView.layer.render(in: context)
  
      context.clear(printableRect)
  
      printPageRenderer.setValue(NSValue(cgRect: printableRect), forKey: "printableRect")
      printPageRenderer.drawPage(at: i, in: UIGraphicsGetPDFContextBounds())
  }
  
  UIGraphicsEndPDFContext()
  </code></pre>
  
  <p>My problem is that the html content which is rendered over the "background.png" is not transparent but has a white background. The transparent attribute in the html style seems to be ignored by the <code>UIPrintPageRenderer</code>. Setting the <code>background-color</code> in the html style to e.g. <code>blue</code> changes the rendered html background color from white to blue. I also tried making the rendered html transparent by making the context transparent with <code>context.clear(printableRect)</code> to no avail.</p>
  
  <p>How can I make  <code>UIPrintPageRenderer</code> print the html content with a transparent background so the already rendered background in the context is not covered by a white background of the html?</p>