PdfBoxGraphics2D.
Just ensure that you call close after you closed the PDDocument to free any temporary files.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class | |
| private static interface |
| Modifier and Type | Field and Description |
|---|---|
| private static final boolean | |
| private PDFont | |
| private final List | |
| private final Map | |
| private static final java. | |
| private final List |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private PDFont | |
| public boolean | canDrawText(AttributedCharacterIterator
Has the text and all its properties iterator, IPdfBoxGraphics2DFontTextDrawer.Environment envImplements de.
|
| public void | close()
Implements java. Close / delete all resources associated with this drawer. |
| public void | drawText(AttributedCharacterIterator
The text with all properties iterator, IPdfBoxGraphics2DFontTextDrawer.Environment envImplements de.
|
| private PDFont | |
| public FontMetrics | getFontMetrics(final Font
the Font f, IPdfBoxGraphics2DFontTextDrawer.the Environment envImplements de.
|
| private float | |
| protected boolean | Returns: true if the font mapping is populated on demand. This is usually only the case if this class has been derived. The default implementation just checks for this.
|
| private boolean | |
| protected PDFont | Returns: the PDFont or null if none can be found.the java.awt.Font for which a mapping should be found font, final IPdfBoxGraphics2DFontTextDrawer.environment of the font mapper envTry to map the java.awt.Font to a PDFont. |
| public void | registerFont(String
the name of the font to use. If null, the name is taken from the font. fontName, InputStream the input stream of the font. This file must be a ttf/otf file! You have to close the stream
outside, this method will not close the stream. fontStream)Register a font. |
| public void | registerFont(String
the name of the font to use. If null, the name is taken from the font. fontName, File the font file. This file must exist for the live time of this object, as the font data will be
read lazy on demand fontFile)Register a font. |
| public void | |
| public void | |
| public void | registerFont(String
the name of the font as returned by name, PDFont java.. This name is used for the
mapping the java.awt.Font to this PDFont.the PDFont to use. This font must be loaded in the current document. font)Register a font which is already associated with the PDDocument |
| private void | showTextOnStream(final IPdfBoxGraphics2DFontTextDrawer.
|
| private PDType0Font |
| DEBUG_BOX | back to summary |
|---|---|
| private static final boolean DEBUG_BOX | |
| fallbackFontUnknownEncodings | back to summary |
|---|---|
| private PDFont fallbackFontUnknownEncodings | |
| fontFiles | back to summary |
|---|---|
| private final List<PdfBoxGraphics2DFontTextDrawer. | |
| fontMap | back to summary |
|---|---|
| private final Map<String, PDFont> fontMap | |
| LOGGER | back to summary |
|---|---|
| private static final java. | |
| tempFiles | back to summary |
|---|---|
| private final List<File> tempFiles | |
| PdfBoxGraphics2DFontTextDrawer | back to summary |
|---|---|
| public PdfBoxGraphics2DFontTextDrawer() | |
| applyFont | back to summary |
|---|---|
| private PDFont applyFont(Font font, IPdfBoxGraphics2DFontTextDrawer. | |
| close | back to summary |
|---|---|
| public void close() Implements java. Close / delete all resources associated with this drawer. This mainly means deleting all temporary files. You can not use this object after a call to close. Calling close multiple times does nothing.
| |
| drawText | back to summary |
|---|---|
| public void drawText(AttributedCharacterIterator iterator, IPdfBoxGraphics2DFontTextDrawer. Implements de.
| |
| findFallbackFont | back to summary |
|---|---|
| private PDFont findFallbackFont(IPdfBoxGraphics2DFontTextDrawer. | |
| getFontMetrics | back to summary |
|---|---|
| public FontMetrics getFontMetrics(final Font f, IPdfBoxGraphics2DFontTextDrawer. Implements de.
| |
| getSensibleThickness | back to summary |
|---|---|
| private float getSensibleThickness(float thickness, Font font) | |
| hasDynamicFontMapping | back to summary |
|---|---|
protected boolean hasDynamicFontMapping()
| |
| iterateRun | back to summary |
|---|---|
| private boolean iterateRun(AttributedCharacterIterator iterator, StringBuilder sb) | |
| mapFont | back to summary |
|---|---|
| protected PDFont mapFont(final Font font, final IPdfBoxGraphics2DFontTextDrawer. Try to map the java.awt.Font to a PDFont.
| |
| registerFont | back to summary |
|---|---|
| public void registerFont(String fontName, InputStream fontStream) throws IOException Register a font. If possible, try to use a font file, i.e.
| |
| registerFont | back to summary |
|---|---|
| public void registerFont(String fontName, File fontFile) Register a font.
| |
| registerFont | back to summary |
|---|---|
| public void registerFont(File fontFile) Override for registerFont(null,fontFile)
| |
| registerFont | back to summary |
|---|---|
| public void registerFont(InputStream fontStream) throws IOException Override for registerFont(null,fontStream)
| |
| registerFont | back to summary |
|---|---|
| public void registerFont(String name, PDFont font) Register a font which is already associated with the PDDocument
| |
| showTextOnStream | back to summary |
|---|---|
| private void showTextOnStream(final IPdfBoxGraphics2DFontTextDrawer. | |
| tryToLoadFont | back to summary |
|---|---|
| private PDType0Font tryToLoadFont(IPdfBoxGraphics2DFontTextDrawer. | |
| Modifier and Type | Field and Description |
|---|---|
| private final PDPageContentStream | |
| private Matrix | |
| pack-priv final List | |
| private double | |
| private double | |
| private AffineTransform |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| private void |
| contentStream | back to summary |
|---|---|
| private final PDPageContentStream contentStream | |
| currentMatrix | back to summary |
|---|---|
| private Matrix currentMatrix | |
| drawers | back to summary |
|---|---|
| pack-priv final List<PdfBoxGraphics2DFontTextDrawer. | |
| fontOffsetY | back to summary |
|---|---|
| private double fontOffsetY | |
| scale | back to summary |
|---|---|
| private double scale | |
| textMatrix | back to summary |
|---|---|
| private AffineTransform textMatrix | |
| DrawTextDecorationState | back to summary |
|---|---|
| public DrawTextDecorationState(PDPageContentStream contentStream) throws IOException | |
| applyTextWidth | back to summary |
|---|---|
| public void applyTextWidth(float stringWidth) | |
| setAttributeMatrix | back to summary |
|---|---|
| public void setAttributeMatrix(AffineTransform fontMatrix) throws IOException | |
| setCurrentTextMatrix | back to summary |
|---|---|
| private void setCurrentTextMatrix(AffineTransform newAT) throws IOException | |
| Access | Constructor and Description |
|---|---|
| private |
| file | back to summary |
|---|---|
| pack-priv File file | |
| overrideName | back to summary |
|---|---|
| pack-priv String overrideName | |
| FontEntry | back to summary |
|---|---|
| private FontEntry() | |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| draw | back to summary |
|---|---|
| public void draw(PDPageContentStream stream) throws IOException | |