public class RtfRenderContext extends TargetRenderContext
TargetRenderContext.GraphicsState, TargetRenderContext.Option
Context.PageBreakRef, Context.StructTag, Context.TableBreakRef
Modifier and Type | Field and Description |
---|---|
String |
type |
authorName, borders, borderToPrint, BUTTON_TYPE, CHECKBOX_TYPE, description, documentTitle, HIDDEN_TYPE, keywords, LISTBOX_TYPE, pageMargin, pageSize, PASSWORD_TYPE, RADIO_OPTION_TYPE, RADIO_TYPE, RESET_TYPE, SELECT_TYPE, SIGNATURE_TYPE, SPACER_TYPE, statusMessages, subject, targetPageHeight, TEXT_TYPE, TEXTAREA_TYPE
absWrappers, cannotStretch, comparator, containerPositions, containerWidths, continueFrom, currentPageBreak, currentPageNum, done, hasTocTable, initialScale, pageBreakPosition, pageBreaks, pageNumberRendererRows, pageTopY, pd4ml, progressMeter, reset, rotated, scale, tocDestinations
Constructor and Description |
---|
RtfRenderContext(PD4ML pd4ml,
TargetRenderer targetRenderer,
OutputStream os,
float containerWidth,
float containerHeight,
PageSize paperFormat,
PageMargins insets,
String type,
boolean idle,
Vector<StatusMessage> statusMessages,
com.pd4ml.util.GOST.Auth license,
boolean convertImgToWmf,
com.pd4ml.cache.FileCache cache) |
Modifier and Type | Method and Description |
---|---|
void |
addAnnotation(BBox position,
String description) |
void |
addBookmark(int level,
String label,
String destinationID,
Renderer originator) |
void |
addDestination(float y,
String destinationID) |
void |
addFormElement(int type,
BBox position,
String value,
String name,
boolean checked,
List<TargetRenderContext.Option> options,
boolean multiselect,
boolean readOnly,
int size,
int align,
String formFont,
float fontSize,
String formFontCharRange,
String title,
String lang,
String extras) |
void |
addHyperlink(BBox position,
String href,
URL base,
String label) |
void |
addJavaScriptAction(String type,
String code) |
void |
adjustPageScaleParams() |
void |
applyWatermarkToCurrentPage(String watermarkID,
boolean rotated,
String alt) |
void |
clipCustomRec(int x,
int y,
int width,
int height,
int[] r1,
int[] r2) |
void |
disable() |
void |
draw(Shape path) |
void |
drawCurvedLine(int x,
int y,
int width,
int height,
int i,
int correctionX,
int correctionY,
int[] r1,
int[] r2,
int bt,
int bb,
boolean doubleBorder) |
void |
drawCustomRect(int x,
int y,
int width,
int height,
int[] r1,
int[] r2,
boolean doubleBorder) |
void |
drawHorizontalRule(int height,
int width,
Style.TextAlign align) |
void |
drawImage(CachedImage img,
int x,
int y,
int scaledWidth,
int scaledHeight,
int id,
String title,
String alt,
String lang,
String extras,
boolean taggedOutput) |
void |
drawLine(int x1,
int y1,
int x2,
int y2) |
void |
drawOval(float x,
float y,
float width,
float height) |
void |
drawRect(int x,
int y,
int width,
int height) |
void |
drawString(String str,
float x,
float y) |
void |
drawString(String str,
int x,
int y) |
void |
embedAttachment(BBox position,
com.pd4ml.cache.CachedItem item,
String name,
String description) |
void |
enable() |
void |
endBlock() |
void |
endCell(boolean skip) |
void |
endCurrentPaintMode() |
void |
endDecoration(int style) |
void |
endDestination(String name) |
void |
endFloat() |
void |
endFooter() |
void |
endGroup() |
void |
endHeader() |
void |
endHyperlink(boolean decorated,
int id) |
void |
endListItem(Style.TextAlign align,
boolean endsNestedList) |
void |
endParagraph() |
void |
endRow() |
void |
endTable() |
void |
endWatermarkOutput() |
void |
fakeParagraph(boolean nested) |
void |
fillCustomRec(int x,
int y,
int width,
int height,
int[] r1,
int[] r2) |
void |
fillOval(float x,
float y,
float width,
float height) |
void |
fillPolygon(int[] xpoints,
int[] ypoints,
int i) |
void |
fillRect(CachedImage tile,
int x,
int y,
int w,
int h,
int shiftX,
int shiftY,
int id) |
void |
fillRect(Gradient gradient,
int x,
int y,
int w,
int h) |
void |
fillRect(int x,
int y,
int width,
int height) |
boolean |
generateForms() |
Color |
getBackground() |
Color |
getColor() |
Object |
getRenderingHint(RenderingHints.Key key) |
boolean |
isRtf() |
void |
lineBreak() |
void |
pageBreak() |
void |
pass(int no) |
void |
popGContext() |
void |
pushGContext() |
void |
resetClip() |
void |
resetOpacity() |
void |
rtlMode(boolean enable,
boolean paragraph) |
void |
setBackground(Color c) |
void |
setCellBackground(Color c) |
void |
setClip(int x,
int y,
int width,
int height) |
void |
setClip(Shape shape) |
void |
setColor(Color color) |
void |
setDottedDashed(boolean dotted,
boolean dashed) |
void |
setFont(com.pd4ml.fonts.CachedFontMetrics font) |
void |
setHAlignment(Style.TextAlign align) |
void |
setHasTitlePage(boolean has) |
void |
setHtmlPageMargins(int l,
int t,
int r,
int b) |
void |
setOpacity(float opacity) |
void |
setPaint(Color color) |
void |
setRenderingHint(RenderingHints.Key key,
Object value) |
void |
setStroke(Stroke stroke) |
void |
setVAlignment(String align) |
void |
startCell(Context.StructTag type,
boolean skip,
float lineHeight,
String title,
float width,
float height,
String lang,
String extras) |
void |
startDecoration(int style) |
void |
startDestination(String name) |
void |
startFloat(boolean left,
String title,
float width,
float height,
String lang,
String extras) |
void |
startFooter(boolean firstPage) |
void |
startGroup() |
void |
startHeader(boolean firstPage) |
void |
startHyperlink(String url,
boolean decorated,
String title,
float width,
float height,
int id,
String lang,
String extras) |
void |
startList(boolean ordered,
int type,
int hash,
String title,
float width,
float height,
String lang,
String extras) |
void |
startListItem(int level,
boolean ordered,
String num,
int hash,
String title,
float width,
float height,
String lang,
String extras) |
void |
startNewPage(int pageNum,
PageSize newFormat,
TargetRenderer targetRenderer,
float scale,
int topY,
int bottomY,
float headerHeight,
float footerHeight,
float footnotesHeight) |
void |
startPageBackgroundMode() |
void |
startPageMarkupMode(float availableHeight) |
void |
startParagraph(boolean nomargin,
int leftMargin,
int topMargin,
int rightMargin,
int bottomMargin,
float lineHeight,
Color bgColor,
String title,
float width,
float height,
String lang,
String extras) |
void |
startPre() |
void |
startRow(com.pd4ml.rtf.TableCellDescription[] cells,
Color background,
boolean keepTableTogether,
boolean keepRowTogether,
boolean headerRow,
String title,
float width,
float height,
String lang,
String extras) |
void |
startTable(Color background,
boolean noLeadingBreak,
float width,
float height,
int leftMargin,
int topMargin,
int rightMargin,
int bottomMargin,
String title,
String lang,
String extras) |
void |
startWatermarkMode(float availableHeight) |
String |
startWatermarkOutput(float x,
float y,
PageSize pageSize,
float scale,
float opacity,
float wmscale,
float angle,
boolean print,
boolean screen) |
void |
suspendParagraph() |
void |
writeDocument(OutputStream os) |
addDiagnostics, applyMatrix, destinationReferenced, endArtifact, endImage, endList, endTableSection, endText, forcePageOffsetRecalc, generateBookmarksFromAnchors, generateBookmarksFromHeadings, getAbsYOffset, getAbsYOffsetOfPageTop, getBase, getCurrentPageNumber, getCurrentTransform, getOffsetOnPage, getStrokeWidth, getYOffsetOnPage, isAdjustPositionToLineWidth, isInternalLink, isInUnitTestMode, linkHasLocalDestination, monitorProgressWith, onLastPage, recalcAndGetAbsYOffset, registerDestination, registerLink, reset, resetWidth, rotate, runHandler, setAdjustPositionToLineWidth, setAuthorName, setBase, setCustomMetadataRecords, setDescription, setDocumentTitle, setGenerateForms, setInitialPageNumber, setKeywords, setNewWidth, setPageMarkupMode, setSubject, simulateNewPage, startArtifact, startImage, startsOnPreviousPage, startTableSection, startText, toString
addAbsWrapper, addPageBreak, addPageBreak, addPageNumberRendererRow, alreadyHasPagebreak, buildDestinationPageMap, callDepth, clean, cleanAndResetOffset, countryCodeValid, currentContainer, decreasePageHeight, enterContainer, exitContainer, getAbsWrapper, getContainerWidth, getFullPageHeight, getLastPageBreakOffset, getMaxPageNum, getNewID, getPageHeight, getPageWidth, getRemainingSpaceInRow, hasTocTable, inArtifact, isByPageMarkup, isFlag, needsAnchosrLookup, normalizePageBreaks, pageBreaksCount, registerTocDestination, removePagebreaksBelow, resetIdCounter, resetNewContainerWidth, setFlag, setHasTocTable, setHorizontalExtent, setLang, setNeedsAnchosrLookup, setNewContainerWidth, setNewHtmlWidth, setPageHeight, setPageWidth, setRemainingSpaceInRow, sortPageBreaks, testTermination, usesAwt
public String type
public RtfRenderContext(PD4ML pd4ml, TargetRenderer targetRenderer, OutputStream os, float containerWidth, float containerHeight, PageSize paperFormat, PageMargins insets, String type, boolean idle, Vector<StatusMessage> statusMessages, com.pd4ml.util.GOST.Auth license, boolean convertImgToWmf, com.pd4ml.cache.FileCache cache)
public void setHasTitlePage(boolean has)
public void startNewPage(int pageNum, PageSize newFormat, TargetRenderer targetRenderer, float scale, int topY, int bottomY, float headerHeight, float footerHeight, float footnotesHeight)
startNewPage
in class TargetRenderContext
public void startHeader(boolean firstPage)
startHeader
in class TargetRenderContext
public void endHeader()
endHeader
in class TargetRenderContext
public void startFooter(boolean firstPage)
startFooter
in class TargetRenderContext
public void endFooter()
endFooter
in class TargetRenderContext
public void adjustPageScaleParams()
adjustPageScaleParams
in class TargetRenderContext
public void startPageBackgroundMode()
startPageBackgroundMode
in class TargetRenderContext
public void startWatermarkMode(float availableHeight)
startWatermarkMode
in class TargetRenderContext
public void startPageMarkupMode(float availableHeight)
startPageMarkupMode
in class TargetRenderContext
public void endCurrentPaintMode()
endCurrentPaintMode
in class TargetRenderContext
public boolean generateForms()
generateForms
in class TargetRenderContext
public void fillRect(Gradient gradient, int x, int y, int w, int h)
fillRect
in class TargetRenderContext
public void fillRect(CachedImage tile, int x, int y, int w, int h, int shiftX, int shiftY, int id)
fillRect
in class TargetRenderContext
public Color getColor()
getColor
in class TargetRenderContext
public void setColor(Color color)
setColor
in class TargetRenderContext
public void setClip(int x, int y, int width, int height)
setClip
in class TargetRenderContext
public void setClip(Shape shape)
setClip
in class TargetRenderContext
public void resetClip()
resetClip
in class TargetRenderContext
public Object getRenderingHint(RenderingHints.Key key)
getRenderingHint
in class TargetRenderContext
public void setRenderingHint(RenderingHints.Key key, Object value)
setRenderingHint
in class TargetRenderContext
public void setPaint(Color color)
setPaint
in class TargetRenderContext
public void setStroke(Stroke stroke)
setStroke
in class TargetRenderContext
public void setOpacity(float opacity)
setOpacity
in class TargetRenderContext
public void resetOpacity()
resetOpacity
in class TargetRenderContext
public void drawLine(int x1, int y1, int x2, int y2)
drawLine
in class TargetRenderContext
public void draw(Shape path)
draw
in class TargetRenderContext
public void drawRect(int x, int y, int width, int height)
drawRect
in class TargetRenderContext
public void drawOval(float x, float y, float width, float height)
drawOval
in class TargetRenderContext
public void fillPolygon(int[] xpoints, int[] ypoints, int i)
fillPolygon
in class TargetRenderContext
public void drawCustomRect(int x, int y, int width, int height, int[] r1, int[] r2, boolean doubleBorder)
drawCustomRect
in class TargetRenderContext
public void clipCustomRec(int x, int y, int width, int height, int[] r1, int[] r2)
clipCustomRec
in class TargetRenderContext
public void fillCustomRec(int x, int y, int width, int height, int[] r1, int[] r2)
fillCustomRec
in class TargetRenderContext
public void drawCurvedLine(int x, int y, int width, int height, int i, int correctionX, int correctionY, int[] r1, int[] r2, int bt, int bb, boolean doubleBorder)
drawCurvedLine
in class TargetRenderContext
public void fillRect(int x, int y, int width, int height)
fillRect
in class TargetRenderContext
public void fillOval(float x, float y, float width, float height)
fillOval
in class TargetRenderContext
public void setFont(com.pd4ml.fonts.CachedFontMetrics font)
setFont
in class TargetRenderContext
public void rtlMode(boolean enable, boolean paragraph)
rtlMode
in class TargetRenderContext
public void startGroup()
startGroup
in class TargetRenderContext
public void endGroup()
endGroup
in class TargetRenderContext
public void drawString(String str, int x, int y)
drawString
in class TargetRenderContext
public void drawString(String str, float x, float y)
drawString
in class TargetRenderContext
public void drawImage(CachedImage img, int x, int y, int scaledWidth, int scaledHeight, int id, String title, String alt, String lang, String extras, boolean taggedOutput)
drawImage
in class TargetRenderContext
public void addBookmark(int level, String label, String destinationID, Renderer originator)
addBookmark
in class TargetRenderContext
public void addDestination(float y, String destinationID)
addDestination
in class TargetRenderContext
public void addAnnotation(BBox position, String description)
addAnnotation
in class TargetRenderContext
public void addHyperlink(BBox position, String href, URL base, String label)
addHyperlink
in class TargetRenderContext
public void addJavaScriptAction(String type, String code)
addJavaScriptAction
in class TargetRenderContext
public void embedAttachment(BBox position, com.pd4ml.cache.CachedItem item, String name, String description)
embedAttachment
in class TargetRenderContext
public void pushGContext()
pushGContext
in class TargetRenderContext
public void popGContext()
popGContext
in class TargetRenderContext
public void addFormElement(int type, BBox position, String value, String name, boolean checked, List<TargetRenderContext.Option> options, boolean multiselect, boolean readOnly, int size, int align, String formFont, float fontSize, String formFontCharRange, String title, String lang, String extras)
addFormElement
in class TargetRenderContext
public void applyWatermarkToCurrentPage(String watermarkID, boolean rotated, String alt)
applyWatermarkToCurrentPage
in class TargetRenderContext
public String startWatermarkOutput(float x, float y, PageSize pageSize, float scale, float opacity, float wmscale, float angle, boolean print, boolean screen)
startWatermarkOutput
in class TargetRenderContext
public void endWatermarkOutput()
endWatermarkOutput
in class TargetRenderContext
public void setDottedDashed(boolean dotted, boolean dashed)
setDottedDashed
in class TargetRenderContext
public void setHtmlPageMargins(int l, int t, int r, int b)
setHtmlPageMargins
in class TargetRenderContext
public void startTable(Color background, boolean noLeadingBreak, float width, float height, int leftMargin, int topMargin, int rightMargin, int bottomMargin, String title, String lang, String extras)
startTable
in class TargetRenderContext
public void startRow(com.pd4ml.rtf.TableCellDescription[] cells, Color background, boolean keepTableTogether, boolean keepRowTogether, boolean headerRow, String title, float width, float height, String lang, String extras)
startRow
in class TargetRenderContext
public void startCell(Context.StructTag type, boolean skip, float lineHeight, String title, float width, float height, String lang, String extras)
startCell
in class TargetRenderContext
public void endCell(boolean skip)
endCell
in class TargetRenderContext
public void endRow()
endRow
in class TargetRenderContext
public void endTable()
endTable
in class TargetRenderContext
public void startParagraph(boolean nomargin, int leftMargin, int topMargin, int rightMargin, int bottomMargin, float lineHeight, Color bgColor, String title, float width, float height, String lang, String extras)
startParagraph
in class TargetRenderContext
public void endParagraph()
endParagraph
in class TargetRenderContext
public void suspendParagraph()
suspendParagraph
in class TargetRenderContext
public void fakeParagraph(boolean nested)
fakeParagraph
in class TargetRenderContext
public void endBlock()
endBlock
in class TargetRenderContext
public void startFloat(boolean left, String title, float width, float height, String lang, String extras)
startFloat
in class TargetRenderContext
public void endFloat()
endFloat
in class TargetRenderContext
public void startPre()
startPre
in class TargetRenderContext
public void startList(boolean ordered, int type, int hash, String title, float width, float height, String lang, String extras)
startList
in class TargetRenderContext
public void startListItem(int level, boolean ordered, String num, int hash, String title, float width, float height, String lang, String extras)
startListItem
in class TargetRenderContext
public void endListItem(Style.TextAlign align, boolean endsNestedList)
endListItem
in class TargetRenderContext
public void startHyperlink(String url, boolean decorated, String title, float width, float height, int id, String lang, String extras)
startHyperlink
in class TargetRenderContext
public void endHyperlink(boolean decorated, int id)
endHyperlink
in class TargetRenderContext
public void startDestination(String name)
startDestination
in class TargetRenderContext
public void endDestination(String name)
endDestination
in class TargetRenderContext
public void startDecoration(int style)
startDecoration
in class TargetRenderContext
public void endDecoration(int style)
endDecoration
in class TargetRenderContext
public void setHAlignment(Style.TextAlign align)
setHAlignment
in class TargetRenderContext
public void setVAlignment(String align)
setVAlignment
in class TargetRenderContext
public void pageBreak()
pageBreak
in class TargetRenderContext
public void lineBreak()
lineBreak
in class TargetRenderContext
public void enable()
enable
in class TargetRenderContext
public void disable()
disable
in class TargetRenderContext
public void setBackground(Color c)
setBackground
in class TargetRenderContext
public Color getBackground()
getBackground
in class TargetRenderContext
public void setCellBackground(Color c)
setCellBackground
in class TargetRenderContext
public void pass(int no)
pass
in class TargetRenderContext
public void drawHorizontalRule(int height, int width, Style.TextAlign align)
drawHorizontalRule
in class TargetRenderContext
public void writeDocument(OutputStream os)
Revision 4.0.15 / 20220727-0149