PDFKit rendering is a little blurry, but crisp on CircleCI

146 views Asked by At

We have automated tests that simulate user interaction, take snapshots and compare those to previously recorded reference images. Tests that include PDF rendering (via Apple’s PDFKit) are slightly blurry on our machines but crisp on CircleCI. This leads to test failures like these (reference, circle, diff, in that order):

reference: reference

circle output: circle

diff: diff

What we’ve tried:

  • The snapshotting library we use lets us pass a tolerance (both overall and per-pixel). We’ve cranked these values up but we’d like to not go any higher so that we don’t miss real failures when they occur.
  • We’ve tried all three of PDFView’s interpolationQuality settings: none, low and high but those didn’t seem to have an effect. The rendering is still slightly blurry on our machines.

We think that the only solution is to use PDFs that aren’t so text heavy. Any other ideas? BTW we are using a slightly modified version of this snapshotting library.

0

There are 0 answers