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 {
paint(img.getGraphics(), bds, circuit, width,
height);
String formatName = null;