} else if (filter.type == FORMAT_PDF) {
com.itextpdf.text.Document document = new com.itextpdf.text.Document(new Rectangle(width, height));
PdfWriter writer = PdfWriter.getInstance(document, stream);
document.open();
PdfContentByte cb = writer.getDirectContent();
DefaultFontMapper fontMapper = new DefaultFontMapper();
BaseFontParameters fontParameters = new BaseFontParameters("LiberationSans-Regular.ttf");
fontParameters.encoding = BaseFont.IDENTITY_H;
fontMapper.putName("Dialog.plain", fontParameters);
fontMapper.putName("SansSerif.plain", fontParameters);
PdfGraphics2D pdfGraphics = new PdfGraphics2D(cb, width, height, fontMapper);
paint(pdfGraphics, bds, circuit, width, height);
pdfGraphics.dispose();
document.close();
} else {