- * <a href="http://www.lowagie.com/iText/">iText</a>.
- * <br /> <br />
- * This is currently using iText 2.1.7.
- * <br /> <br />
- * The issue is that versions from the 5.x series were slow to handle lots of
- * fonts with the DefaultFontMapper. 2.x seemed a little slower than 1.x,
- * but 5.x took up to 10 times the time to load, meaning a lag of several
- * seconds when starting sketches on a machine that had a good handful of
- * fonts installed. (Like, say, anyone in our target audience. Or me.)
- */
- public class PGraphicsPDF extends PGraphicsJava2D {
- /** File being written, if it's a file. */
- protected File file;
- /** OutputStream being written to, if using an OutputStream. */
- protected OutputStream output;
- protected Document document;
- protected PdfWriter writer;
- protected PdfContentByte content;
- /** Shared across instances because it's incredibly time-consuming to create. */