AwtCanvas
KiteCanvas backed by java.awt.Graphics2D. Pure JRE: no Skia, no Compose, no native binaries.
The right choice when:
you're rendering a PDF inside an AWT / Swing / JavaFX (via
SwingNode) componentyou want PNG/JPEG output via
javax.imageio.ImageIOwithout pulling in Skia's native libsserver-side rendering where the JVM is already there
Pair with AwtPdfRasterizer for the common "give me a BufferedImage" use case.
Caveats: Java2D supports a subset of PDF's 16 blend modes natively. The common ones (Normal, SrcOver) are mapped to AlphaComposite. The rest (Multiply, Screen, …) require a custom java.awt.Composite. We ship a pixel-level PdfBlendComposite that implements all 16 modes for fidelity.
Functions
Soft mask (ISO 32000-1, 11.6.5): the content paints into its own transparent layer, the mask scales that layer's alpha, and the layer then composites onto the page once. The backdrop is never read or masked (#78), the layer has alpha whatever the destination type (#80), and the mask group's colours never reach the page (#79). Skia and Compose use the same layer model.
ISO 32000-1, 11.4.5: a group's constant alpha and blend mode apply once, when the group composites onto its backdrop. So a group that has them paints into a transparent layer first (#77). The layer is isolated, and knockout is not honoured (#125).
The outline of text in the logical font drawGlyphs draws a font without embedded outlines in, at 1000 units per em with y up (#85).
Java2D clips by pixel centre and never anti-aliases a clip, so a clip is applied as MuPDF applies it (#285). A rectangle clips to the whole pixels it touches. Any other shape opens a SoftClip: the paints inside go to a layer, which composites onto the page through the anti-aliased coverage of the shape when the clip pops.