public class PdfBoxFastOutputDevice extends AbstractOutputDevice implements OutputDevice, PdfBoxOutputDevice
| Constructor and Description |
|---|
PdfBoxFastOutputDevice(float dotsPerPoint,
boolean testMode,
boolean pdfUaConform,
boolean pdfAConform) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMetadata(String name,
String value)
Appends a name/content metadata pair to this output device.
|
void |
close()
Perform any internal cleanup needed
|
void |
draw(Shape s) |
void |
drawBorderLine(Shape bounds,
int side,
int lineWidth,
boolean solid) |
void |
drawImage(FSImage fsImage,
int x,
int y,
boolean interpolate) |
protected void |
drawLine(int x1,
int y1,
int x2,
int y2) |
void |
drawLinearGradient(FSLinearGradient backgroundLinearGradient,
Shape bounds) |
void |
drawOval(int x,
int y,
int width,
int height) |
void |
drawPdfAsImage(org.apache.pdfbox.pdmodel.graphics.form.PDFormXObject _srcObject,
Rectangle contentBounds,
float intrinsicWidth,
float intrinsicHeight) |
void |
drawRect(int x,
int y,
int width,
int height) |
void |
drawSelection(RenderingContext c,
InlineText inlineText) |
void |
drawString(String s,
float x,
float y,
JustificationInfo info) |
void |
drawStringFast(String s,
float x,
float y,
JustificationInfo info,
PdfBoxFontResolver.FontDescription desc,
float fontSize) |
void |
drawWithGraphics(float x,
float y,
float width,
float height,
OutputDeviceGraphicsDrawer renderer) |
void |
endStructure(Object token) |
void |
fill(Shape s) |
void |
fillOval(int x,
int y,
int width,
int height) |
void |
fillRect(int x,
int y,
int width,
int height) |
List<PagePosition<Box>> |
findPagePositionsByID(CssContext c,
Pattern pattern) |
void |
finish(RenderingContext c,
Box root) |
void |
finishPage() |
PdfContentStreamAdapter |
getCurrentPage() |
float |
getDeviceLength(float length)
Given a value in dots units, converts to PDF points.
|
float |
getDotsPerPoint() |
List<com.openhtmltopdf.pdfboxout.PdfBoxUtil.Metadata> |
getMetadata() |
String |
getMetadataByName(String name)
Searches the metadata name/content pairs of the current document and
returns the content value from the first pair with a matching name.
|
List<String> |
getMetadataListByName(String name)
Searches the metadata name/content pairs of the current document and
returns any content values with a matching name in an ArrayList.
|
org.apache.pdfbox.pdmodel.PDPage |
getPage() |
int |
getPageRefY(Box box) |
Object |
getRenderingHint(RenderingHints.Key key) |
SharedContext |
getSharedContext() |
int |
getStartPageNo() |
Stroke |
getStroke() |
org.apache.pdfbox.pdmodel.PDDocument |
getWriter() |
void |
initializePage(org.apache.pdfbox.pdmodel.PDPageContentStream currentPage,
org.apache.pdfbox.pdmodel.PDPage page,
float height)
Start a page.
|
boolean |
isFastRenderer() |
boolean |
isPDF() |
boolean |
isSupportsCMYKColors() |
float |
normalizeY(float y)
Converts a top down unit to a bottom up PDF unit for the current page.
|
float |
normalizeY(float y,
float pageHeight)
Converts a top down unit to a bottom up PDF unit for the specified page height.
|
void |
paintBackground(RenderingContext c,
Box box)
We use paintBackground to do extra stuff such as processing links, forms and form controls.
|
void |
paintReplacedElement(RenderingContext c,
BlockBox box) |
void |
popClip() |
void |
popTransformLayer() |
void |
pushClip(Shape s) |
void |
pushTransformLayer(AffineTransform transform) |
void |
realizeImage(PdfBoxImage img) |
void |
setBidiReorderer(BidiReorderer reorderer) |
void |
setColor(FSColor color) |
void |
setFont(FSFont font) |
void |
setPaint(Paint paint) |
void |
setRenderingContext(RenderingContext result) |
void |
setRenderingHint(RenderingHints.Key key,
Object value) |
void |
setRoot(Box root) |
void |
setSharedContext(SharedContext sharedContext) |
void |
setStartPageNo(int startPageNo) |
void |
setStroke(Stroke s) |
void |
setWriter(org.apache.pdfbox.pdmodel.PDDocument writer) |
void |
start(Document doc) |
Object |
startStructure(StructureType type,
Box box) |
void |
translate(double tx,
double ty) |
drawDebugOutline, drawText, drawTextDecoration, drawTextDecoration, getFontSpecification, paintBackground, paintBorder, paintBorder, paintCollapsedBorder, setFontSpecificationclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdrawDebugOutline, drawText, drawTextDecoration, drawTextDecoration, paintBackground, paintBorder, paintBorder, paintCollapsedBorderpublic PdfBoxFastOutputDevice(float dotsPerPoint,
boolean testMode,
boolean pdfUaConform,
boolean pdfAConform)
public void setWriter(org.apache.pdfbox.pdmodel.PDDocument writer)
setWriter in interface PdfBoxOutputDevicepublic org.apache.pdfbox.pdmodel.PDDocument getWriter()
getWriter in interface PdfBoxOutputDevicepublic void initializePage(org.apache.pdfbox.pdmodel.PDPageContentStream currentPage,
org.apache.pdfbox.pdmodel.PDPage page,
float height)
initializePage in interface PdfBoxOutputDevicepublic void finishPage()
finishPage in interface PdfBoxOutputDevicepublic void paintReplacedElement(RenderingContext c, BlockBox box)
paintReplacedElement in interface OutputDevicepaintReplacedElement in interface PdfBoxOutputDevicepublic void paintBackground(RenderingContext c, Box box)
paintBackground in interface OutputDevicepaintBackground in interface PdfBoxOutputDevicepaintBackground in class AbstractOutputDevicepublic float getDeviceLength(float length)
getDeviceLength in interface PdfBoxOutputDevicepublic void drawBorderLine(Shape bounds, int side, int lineWidth, boolean solid)
drawBorderLine in interface OutputDevicedrawBorderLine in interface PdfBoxOutputDevicepublic void setColor(FSColor color)
setColor in interface OutputDevicesetColor in interface PdfBoxOutputDevicepublic void draw(Shape s)
draw in interface OutputDevicedraw in interface PdfBoxOutputDeviceprotected void drawLine(int x1,
int y1,
int x2,
int y2)
drawLine in class AbstractOutputDevicepublic void drawRect(int x,
int y,
int width,
int height)
drawRect in interface OutputDevicedrawRect in interface PdfBoxOutputDevicepublic void drawOval(int x,
int y,
int width,
int height)
drawOval in interface OutputDevicedrawOval in interface PdfBoxOutputDevicepublic void fill(Shape s)
fill in interface OutputDevicefill in interface PdfBoxOutputDevicepublic void fillRect(int x,
int y,
int width,
int height)
fillRect in interface OutputDevicefillRect in interface PdfBoxOutputDevicepublic void fillOval(int x,
int y,
int width,
int height)
fillOval in interface OutputDevicefillOval in interface PdfBoxOutputDevicepublic void translate(double tx,
double ty)
translate in interface OutputDevicetranslate in interface PdfBoxOutputDevicepublic Object getRenderingHint(RenderingHints.Key key)
getRenderingHint in interface OutputDevicegetRenderingHint in interface PdfBoxOutputDevicepublic void setRenderingHint(RenderingHints.Key key, Object value)
setRenderingHint in interface OutputDevicesetRenderingHint in interface PdfBoxOutputDevicepublic void setFont(FSFont font)
setFont in interface OutputDevicesetFont in interface PdfBoxOutputDevicepublic void drawString(String s, float x, float y, JustificationInfo info)
drawString in interface PdfBoxOutputDevicepublic void drawStringFast(String s, float x, float y, JustificationInfo info, PdfBoxFontResolver.FontDescription desc, float fontSize)
drawStringFast in interface PdfBoxOutputDevicepublic PdfContentStreamAdapter getCurrentPage()
getCurrentPage in interface PdfBoxOutputDevicepublic org.apache.pdfbox.pdmodel.PDPage getPage()
getPage in interface PdfBoxOutputDevicepublic float normalizeY(float y)
public float normalizeY(float y,
float pageHeight)
normalizeY in interface PdfBoxOutputDevicepublic void setStroke(Stroke s)
setStroke in interface OutputDevicesetStroke in interface PdfBoxOutputDevicepublic void popClip()
popClip in interface OutputDevicepopClip in interface PdfBoxOutputDevicepublic void pushClip(Shape s)
pushClip in interface OutputDevicepushClip in interface PdfBoxOutputDevicepublic Stroke getStroke()
getStroke in interface OutputDevicegetStroke in interface PdfBoxOutputDevicepublic void realizeImage(PdfBoxImage img)
realizeImage in interface PdfBoxOutputDevicepublic void drawLinearGradient(FSLinearGradient backgroundLinearGradient, Shape bounds)
drawLinearGradient in interface OutputDevicepublic void drawImage(FSImage fsImage, int x, int y, boolean interpolate)
drawImage in interface OutputDevicedrawImage in interface PdfBoxOutputDevicepublic void drawPdfAsImage(org.apache.pdfbox.pdmodel.graphics.form.PDFormXObject _srcObject,
Rectangle contentBounds,
float intrinsicWidth,
float intrinsicHeight)
drawPdfAsImage in interface PdfBoxOutputDevicepublic float getDotsPerPoint()
getDotsPerPoint in interface PdfBoxOutputDevicepublic void start(Document doc)
start in interface PdfBoxOutputDevicepublic void finish(RenderingContext c, Box root)
finish in interface PdfBoxOutputDevicepublic int getPageRefY(Box box)
getPageRefY in interface PdfBoxOutputDevicepublic void addMetadata(String name, String value)
addMetadata in interface PdfBoxOutputDevicename - the name of the metadata element to add.public String getMetadataByName(String name)
getMetadataByName in interface PdfBoxOutputDevicename - the metadata element name to locate.public List<String> getMetadataListByName(String name)
getMetadataListByName in interface PdfBoxOutputDevicename - the metadata element name to locate.public List<com.openhtmltopdf.pdfboxout.PdfBoxUtil.Metadata> getMetadata()
getMetadata in interface PdfBoxOutputDevicepublic SharedContext getSharedContext()
getSharedContext in interface PdfBoxOutputDevicepublic void setSharedContext(SharedContext sharedContext)
setSharedContext in interface PdfBoxOutputDevicepublic void setRoot(Box root)
setRoot in interface PdfBoxOutputDevicepublic int getStartPageNo()
getStartPageNo in interface PdfBoxOutputDevicepublic void setStartPageNo(int startPageNo)
setStartPageNo in interface PdfBoxOutputDevicepublic void drawSelection(RenderingContext c, InlineText inlineText)
drawSelection in interface OutputDevicedrawSelection in interface PdfBoxOutputDevicepublic boolean isSupportsCMYKColors()
isSupportsCMYKColors in interface OutputDeviceisSupportsCMYKColors in interface PdfBoxOutputDevicepublic void drawWithGraphics(float x,
float y,
float width,
float height,
OutputDeviceGraphicsDrawer renderer)
drawWithGraphics in interface OutputDevicedrawWithGraphics in interface PdfBoxOutputDevicepublic List<PagePosition<Box>> findPagePositionsByID(CssContext c, Pattern pattern)
findPagePositionsByID in interface PdfBoxOutputDevicepublic void setRenderingContext(RenderingContext result)
setRenderingContext in interface PdfBoxOutputDevicepublic void setBidiReorderer(BidiReorderer reorderer)
setBidiReorderer in interface PdfBoxOutputDevicepublic void setPaint(Paint paint)
setPaint in interface OutputDevicesetPaint in interface PdfBoxOutputDevicepublic boolean isPDF()
isPDF in interface OutputDeviceisPDF in interface PdfBoxOutputDeviceisPDF in class AbstractOutputDevicepublic void close()
close in interface PdfBoxOutputDeviceclose in interface Closeableclose in interface AutoCloseablepublic void pushTransformLayer(AffineTransform transform)
pushTransformLayer in interface OutputDevicepushTransformLayer in interface PdfBoxOutputDevicepublic void popTransformLayer()
popTransformLayer in interface OutputDevicepopTransformLayer in interface PdfBoxOutputDevicepublic boolean isFastRenderer()
isFastRenderer in interface PdfBoxOutputDevicepublic Object startStructure(StructureType type, Box box)
startStructure in interface OutputDevicepublic void endStructure(Object token)
endStructure in interface OutputDeviceCopyright © 2004–2025. All rights reserved.