Top Inners Fields Constructors Methods
com.openhtmltopdf.pdfboxout

public Class PdfBoxSlowOutputDevice

extends AbstractOutputDevice
implements OutputDevice, PdfBoxOutputDevice
Class Inheritance
All Implemented Interfaces
com.openhtmltopdf.pdfboxout.PdfBoxOutputDevice, com.openhtmltopdf.extend.OutputDevice
Imports
com.openhtmltopdf.bidi.BidiReorderer, .SimpleBidiReorderer, com.openhtmltopdf.css.constants.IdentValue, com.openhtmltopdf.css.parser.FSCMYKColor, .FSColor, .FSRGBColor, com.openhtmltopdf.css.style.CalculatedStyle, .CssContext, com.openhtmltopdf.css.value.FontSpecification, com.openhtmltopdf.extend.FSImage, .OutputDevice, .OutputDeviceGraphicsDrawer, .StructureType, com.openhtmltopdf.layout.SharedContext, com.openhtmltopdf.outputdevice.helper.FontResolverHelper, com.openhtmltopdf.pdfboxout.PdfBoxFontResolver.FontDescription, .PdfBoxPerDocumentFormState, com.openhtmltopdf.render.*, com.openhtmltopdf.util.ArrayUtil, .Configuration, .LogMessageId, .OpenUtil, .XRLog, de.rototor.pdfbox.graphics2d.PdfBoxGraphics2D, .PdfBoxGraphics2DFontTextDrawer, org.apache.pdfbox.cos.COSName, org.apache.pdfbox.pdmodel.PDDocument, .PDPage, .PDPageContentStream, org.apache.pdfbox.pdmodel.font.PDFont, org.apache.pdfbox.pdmodel.graphics.form.PDFormXObject, org.apache.pdfbox.pdmodel.graphics.image.JPEGFactory, .LosslessFactory, .PDImageXObject, org.apache.pdfbox.pdmodel.graphics.state.RenderingMode, org.apache.pdfbox.pdmodel.interactive.documentnavigation.destination.PDDestination, .PDPageFitHeightDestination, .PDPageXYZDestination, org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDDocumentOutline, .PDOutlineItem, .PDOutlineNode, org.w3c.dom.Document, .Element, javax.imageio.ImageIO, java.awt.*, .RenderingHints.Key, java.awt.geom.*, java.awt.image.BufferedImage, java.io.ByteArrayInputStream, .IOException, .InputStream, java.util.*, .List, .Map.Entry, java.util.logging.Level, java.util.regex.Pattern

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
public static class
pack-priv static class

Field Summary

Modifier and TypeField and Description
private float
private float
private final List<PdfBoxSlowOutputDevice.Bookmark>
private Area
private FSColor
private PdfContentStreamAdapter
private PDDestination
private float
private FSColor
private PdfBoxFSFont
private PdfBoxGraphics2DFontTextDrawer
private final PdfBoxPerDocumentFormState
private PdfBoxLinkManager
_linkManager

References Deprecated PdfBoxLinkManager is deprecated or references (maybe indirectly) at least one deprecated element.
private final List<PdfBoxSlowOutputDevice.Metadata>
private Stroke
private Stroke
private PDPage
private float
private RenderingContext
private BidiReorderer
private Box
private SharedContext
private int
private Stroke
private FSColor
private final boolean
private AffineTransform
private PDDocument
private static final int
private int
private static final int
private static final AffineTransform
private static final boolean
private static final int
private static final BasicStroke
private final Deque<AffineTransform>

Constructor Summary

AccessConstructor and Description
public
PdfBoxSlowOutputDevice(float dotsPerPoint, boolean testMode)

Method Summary

Modifier and TypeMethod and Description
public void
addMetadata(String
the name of the metadata element to add.
name
,
String value)

Implements com.openhtmltopdf.pdfboxout.PdfBoxOutputDevice.addMetadata.

Appends a name/content metadata pair to this output device.

private PagePosition<Box>
private void
public void
public void
close()

Implements com.openhtmltopdf.pdfboxout.PdfBoxOutputDevice.close.

Perform any internal cleanup needed

public void
public void
public void
protected void
drawLine(int x1, int y1, int x2, int y2)

Implements abstract com.openhtmltopdf.render.AbstractOutputDevice.drawLine.

public void
public void
drawPdfAsImage(PDFormXObject _src, Rectangle contentBounds, float intrinsicWidth, float intrinsicHeight)

Implements com.openhtmltopdf.pdfboxout.PdfBoxOutputDevice.drawPdfAsImage.

public void
public void
public void
public void
public void
drawWithGraphics(float x, float y, float width, float height, OutputDeviceGraphicsDrawer renderer)

Implements com.openhtmltopdf.extend.OutputDevice.drawWithGraphics, com.openhtmltopdf.pdfboxout.PdfBoxOutputDevice.drawWithGraphics.

Draw something using a Graphics2D at the given rectangle.

public void
private void
private void
public void
public void
public void
public List<PagePosition<Box>>
public void
public void
private void
followPath(Shape s, int drawType)

public float
public float
public Shape
public PdfContentStreamAdapter
public float
getDeviceLength(float length)

Implements com.openhtmltopdf.pdfboxout.PdfBoxOutputDevice.getDeviceLength.

Given a value in dots units, converts to PDF points.

public float
public List<PdfBoxSlowOutputDevice.Metadata>
public String

Returns:

the content value of the first found metadata element; otherwise null.
getMetadataByName
(String
the metadata element name to locate.
name
)

Implements com.openhtmltopdf.pdfboxout.PdfBoxOutputDevice.getMetadataByName.

Searches the metadata name/content pairs of the current document and returns the content value from the first pair with a matching name.

public List<String>

Returns:

an ArrayList with matching content values; otherwise an empty list.
getMetadataListByName
(String
the metadata element name to locate.
name
)

Implements com.openhtmltopdf.pdfboxout.PdfBoxOutputDevice.getMetadataListByName.

Searches the metadata name/content pairs of the current document and returns any content values with a matching name in an ArrayList.

public PDPage
public int
public Object
public SharedContext
public int
public Stroke
private AffineTransform
public PDDocument
private void
public void
public boolean
public boolean
public boolean
public boolean
private void
private void
private void
loadMetadata(Document
the Document level node of the parsed xhtml file.
doc
)

Locates and stores all metadata values in the document head that contain name/content pairs.

private Object[]
private AffineTransform
normalizeMatrix(AffineTransform current)

This returns a matrix that will convert y values to bottom up coordinate space (as used by PDFs).

private AffineTransform
private float
normalizeY(float y)

Converts a top down unit to a bottom up PDF unit for the current page.

public float
normalizeY(float y, float pageHeight)

Implements com.openhtmltopdf.pdfboxout.PdfBoxOutputDevice.normalizeY.

Converts a top down unit to a bottom up PDF unit for the specified page height.

private void
normalizeY(float[] coords)

public void
public void
public void
public void
public void
private void
public void
public void
public List<AffineTransform>
pushTransforms(List<AffineTransform> transforms)

Implements com.openhtmltopdf.extend.OutputDevice.pushTransforms, com.openhtmltopdf.pdfboxout.PdfBoxOutputDevice.pushTransforms.

Apply the given transform on top of the current one in the PDF graphics stream.

public void
private void
public void
public void
public void
public void
public void
setMetadata(String
the metadata element name to locate.
name
,
String value)

Implements com.openhtmltopdf.pdfboxout.PdfBoxOutputDevice.setMetadata.

Replaces all copies of the named metadata with a single value.

public void
public void
public void
public void
public void
public void
public void
private void
setStrokeDiff(Stroke newStroke, Stroke oldStroke)

public void
public void
public Object
startStructure(StructureType type, Box box)

Implements com.openhtmltopdf.extend.OutputDevice.startStructure.

Propagate the structure heirachy to allow for PDF/UA compliance.

private Stroke
public void
private void
private void
private void
Inherited from com.openhtmltopdf.render.AbstractOutputDevice:
drawDebugOutlinedrawTextdrawTextDecorationdrawTextDecorationgetFontSpecificationpaintBackgroundpaintBorderpaintBorderpaintCollapsedBordersetFontSpecification