AwtCanvas
PdfCanvas 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 via offscreen compositing. We render the content layer onto an offscreen BufferedImage, render the mask group onto a second one, apply DST_IN, then blit the result onto the underlying Graphics2D.
Open an offscreen layer for transparency-group compositing. Java2D has no built-in saveLayer like Skia, so we manually pixel-render into a BufferedImage and blit it back when the group ends.