title: How would I invert text color on a pdf rendered with CoreGraphics on iOS?
body: <p>I am using an open-source PDF viewing library (VFR PDF Reader <a href="https://github.com/vfr/Reader" rel="nofollow">https://github.com/vfr/Reader</a>).  I'm trying to implement "night mode" or black background with white text.  I can get the background to any color I like but I can't get the text color to change.  You can see where you can modify the background color at <a href="https://github.com/vfr/Reader/blob/master/Sources/ReaderContentPage.m" rel="nofollow">https://github.com/vfr/Reader/blob/master/Sources/ReaderContentPage.m</a> in the "drawLayer" method.  It is simply changing the color of the rectangle the PDF is rendered on.  </p>
  
  <p>My question is: is there something I can do to the "context" that would cause the text in the pdf to change color (in my case I want white text)?  The line in question looks like this (line 558):</p>
  
  <pre><code>CGContextDrawPDFPage(context, _PDFPageRef); // Render the PDF page into the context
  </code></pre>