public interface PdfBoxOutputDevice extends OutputDevice, Closeable
| 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) |
void |
drawOval(int x,
int y,
int width,
int height) |
void |
drawPdfAsImage(org.apache.pdfbox.pdmodel.graphics.form.PDFormXObject _src,
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 |
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,
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) |
void |
translate(double tx,
double ty) |
drawDebugOutline, drawLinearGradient, drawText, drawTextDecoration, drawTextDecoration, endStructure, paintBackground, paintBorder, paintBorder, paintCollapsedBorder, startStructurevoid setWriter(org.apache.pdfbox.pdmodel.PDDocument writer)
org.apache.pdfbox.pdmodel.PDDocument getWriter()
void initializePage(org.apache.pdfbox.pdmodel.PDPageContentStream currentPage,
org.apache.pdfbox.pdmodel.PDPage page,
float height)
void finishPage()
void paintReplacedElement(RenderingContext c, BlockBox box)
paintReplacedElement in interface OutputDevicevoid paintBackground(RenderingContext c, Box box)
paintBackground in interface OutputDevicefloat getDeviceLength(float length)
void drawBorderLine(Shape bounds, int side, int lineWidth, boolean solid)
drawBorderLine in interface OutputDevicevoid setColor(FSColor color)
setColor in interface OutputDevicevoid draw(Shape s)
draw in interface OutputDevicevoid drawRect(int x,
int y,
int width,
int height)
drawRect in interface OutputDevicevoid drawOval(int x,
int y,
int width,
int height)
drawOval in interface OutputDevicevoid fill(Shape s)
fill in interface OutputDevicevoid fillRect(int x,
int y,
int width,
int height)
fillRect in interface OutputDevicevoid fillOval(int x,
int y,
int width,
int height)
fillOval in interface OutputDevicevoid translate(double tx,
double ty)
translate in interface OutputDeviceObject getRenderingHint(RenderingHints.Key key)
getRenderingHint in interface OutputDevicevoid setRenderingHint(RenderingHints.Key key, Object value)
setRenderingHint in interface OutputDevicevoid setFont(FSFont font)
setFont in interface OutputDevicevoid drawString(String s, float x, float y, JustificationInfo info)
void drawStringFast(String s, float x, float y, JustificationInfo info, PdfBoxFontResolver.FontDescription desc, float fontSize)
PdfContentStreamAdapter getCurrentPage()
org.apache.pdfbox.pdmodel.PDPage getPage()
float normalizeY(float y,
float pageHeight)
void setStroke(Stroke s)
setStroke in interface OutputDevicevoid popClip()
popClip in interface OutputDevicevoid pushClip(Shape s)
pushClip in interface OutputDeviceStroke getStroke()
getStroke in interface OutputDevicevoid realizeImage(PdfBoxImage img)
void drawImage(FSImage fsImage, int x, int y, boolean interpolate)
drawImage in interface OutputDevicefloat getDotsPerPoint()
void start(Document doc)
void finish(RenderingContext c, Box root)
void addMetadata(String name, String value)
name - the name of the metadata element to add.String getMetadataByName(String name)
name - the metadata element name to locate.List<String> getMetadataListByName(String name)
name - the metadata element name to locate.SharedContext getSharedContext()
void setSharedContext(SharedContext sharedContext)
void setRoot(Box root)
int getStartPageNo()
void setStartPageNo(int startPageNo)
void drawSelection(RenderingContext c, InlineText inlineText)
drawSelection in interface OutputDeviceboolean isSupportsCMYKColors()
isSupportsCMYKColors in interface OutputDevicevoid drawWithGraphics(float x,
float y,
float width,
float height,
OutputDeviceGraphicsDrawer renderer)
drawWithGraphics in interface OutputDeviceList<PagePosition<Box>> findPagePositionsByID(CssContext c, Pattern pattern)
void setRenderingContext(RenderingContext result)
void setBidiReorderer(BidiReorderer reorderer)
void setPaint(Paint paint)
setPaint in interface OutputDeviceboolean isPDF()
isPDF in interface OutputDevicevoid close()
close in interface AutoCloseableclose in interface Closeablevoid pushTransformLayer(AffineTransform transform)
pushTransformLayer in interface OutputDevicevoid popTransformLayer()
popTransformLayer in interface OutputDeviceboolean isFastRenderer()
int getPageRefY(Box box)
List<com.openhtmltopdf.pdfboxout.PdfBoxUtil.Metadata> getMetadata()
void drawPdfAsImage(org.apache.pdfbox.pdmodel.graphics.form.PDFormXObject _src,
Rectangle contentBounds,
float intrinsicWidth,
float intrinsicHeight)
Copyright © 2004–2025. All rights reserved.