public class HyperlinkAnnotationProcessor extends Object implements AnnotationProcessor
Annotations.HyperlinkAnnotations and
Annotations.AnchorAnnotations, and adds the needed hyperlink metadata to the PDF
document.| Constructor and Description |
|---|
HyperlinkAnnotationProcessor() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPage(DrawContext drawContext)
Called after a page is drawn.
|
void |
afterRender(org.apache.pdfbox.pdmodel.PDDocument document)
Called after all rendering has been performed.
|
void |
annotatedObjectDrawn(Annotated drawnObject,
DrawContext drawContext,
Position upperLeft,
float width,
float height)
Called if an annotated object has been drawn.
|
void |
beforePage(DrawContext drawContext)
Called before a page is drawn.
|
protected void |
handleAnchorAnnotations(AnnotatedStyledText annotatedText,
DrawContext drawContext,
Position upperLeft) |
protected void |
handleHyperlinkAnnotations(AnnotatedStyledText annotatedText,
DrawContext drawContext,
Position upperLeft,
float width,
float height) |
public void annotatedObjectDrawn(Annotated drawnObject, DrawContext drawContext, Position upperLeft, float width, float height) throws IOException
AnnotationProcessorannotatedObjectDrawn in interface AnnotationProcessordrawnObject - the drawn object.drawContext - the drawing context.upperLeft - the upper left position the object has been drawn to.width - the width of the drawn object.height - the height of the drawn object.IOException - by pdfbox.protected void handleAnchorAnnotations(AnnotatedStyledText annotatedText, DrawContext drawContext, Position upperLeft)
protected void handleHyperlinkAnnotations(AnnotatedStyledText annotatedText, DrawContext drawContext, Position upperLeft, float width, float height)
public void beforePage(DrawContext drawContext)
AnnotationProcessorbeforePage in interface AnnotationProcessordrawContext - the drawing context.public void afterPage(DrawContext drawContext)
AnnotationProcessorafterPage in interface AnnotationProcessordrawContext - the drawing context.public void afterRender(org.apache.pdfbox.pdmodel.PDDocument document)
throws IOException
AnnotationProcessorafterRender in interface AnnotationProcessordocument - the document.IOException - by pdfbox.Copyright © 2021. All rights reserved.