public class PdfRenderContext extends TargetRenderContext
TargetRenderContext.GraphicsState, TargetRenderContext.OptionContext.PageBreakRef, Context.StructTag, Context.TableBreakRef| Modifier and Type | Field and Description | 
|---|---|
com.pd4ml.pdf.builder.PdfDocumentBuilder | 
doc  | 
com.pd4ml.util.GOST.Auth | 
license  | 
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_TYPEabsWrappers, cannotStretch, comparator, containerPositions, containerWidths, continueFrom, currentPageBreak, currentPageNum, done, hasTocTable, initialScale, pageBreakPosition, pageBreaks, pageNumberRendererRows, pageTopY, pd4ml, progressMeter, reset, rotated, scale, tocDestinations| Constructor and Description | 
|---|
PdfRenderContext(PD4ML pd4ml,
                TargetRenderer targetRenderer,
                String pdfFormat,
                float containerWidth,
                float containerHeight,
                boolean generateForms,
                com.pd4ml.fonts.FontCache cache,
                Vector<StatusMessage> statusMessages,
                com.pd4ml.util.ProgressMeter progressMeter)  | 
| 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 | 
addDiagnostics(String text)  | 
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 | 
applyMatrix(AffineTransform matrix)  | 
void | 
applyWatermarkToCurrentPage(String watermarkID,
                           boolean rotated,
                           String alt)  | 
void | 
clipCustomRec(int x,
             int y,
             int width,
             int height,
             int[] r1,
             int[] r2)  | 
boolean | 
destinationReferenced(String name)  | 
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 | 
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 | 
drawPolygon(int[] xpoints,
           int[] ypoints,
           int npoints)  | 
void | 
drawPolyline(int[] xpoints,
            int[] ypoints,
            int npoints)  | 
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 | 
endArtifact()  | 
void | 
endCell(boolean skip)  | 
void | 
endCurrentPaintMode()  | 
void | 
endFloat()  | 
void | 
endHyperlink(boolean decorated,
            int id)  | 
void | 
endImage(boolean nodeCreated)  | 
void | 
endList()  | 
void | 
endListItem(Style.TextAlign align,
           boolean endsNestedList)  | 
void | 
endParagraph()  | 
void | 
endRow()  | 
void | 
endTable()  | 
void | 
endTableSection()  | 
void | 
endText(int id)  | 
void | 
endWatermarkOutput()  | 
void | 
fill(Shape path)  | 
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 npoints)  | 
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 | 
generateBookmarksFromAnchors()  | 
boolean | 
generateBookmarksFromHeadings()  | 
boolean | 
generateForms()  | 
com.pd4ml.pdf.parser.PdfDoc | 
getBuilder()  | 
Color | 
getColor()  | 
AffineTransform | 
getCurrentTransform()  | 
float | 
getInitialScale()  | 
Object | 
getRenderingHint(RenderingHints.Key key)  | 
float | 
getScale()  | 
boolean | 
inArtifact()  | 
boolean | 
isInUnitTestMode()  | 
boolean | 
linkHasLocalDestination(String name)  | 
void | 
popGContext()  | 
void | 
pushGContext()  | 
void | 
registerDestination(String name)  | 
void | 
registerLink(String name)  | 
void | 
resetClip()  | 
void | 
resetOpacity()  | 
void | 
rtlMode(boolean enable,
       boolean paragraph)  | 
void | 
runHandler(LayoutRect pos,
          CustomTag handler,
          float width,
          float height)  | 
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 | 
setGenerateBookmarksFromAnchors(boolean generateBookmarksFromAnchors)  | 
void | 
setGenerateBookmarksFromHeadings(boolean generateBookmarksFromHeadings)  | 
void | 
setInitialScale(float initialScale)  | 
void | 
setLang(String lang)  | 
void | 
setLicense(com.pd4ml.util.GOST.Auth license)  | 
void | 
setOpacity(float opacity)  | 
void | 
setPaint(Color color)  | 
void | 
setPassword(String password)  | 
void | 
setPermissions(int permissions)  | 
void | 
setRenderingHint(RenderingHints.Key key,
                Object value)  | 
void | 
setScale(float scale)  | 
void | 
setStroke(Stroke stroke)  | 
void | 
simulateNewPage(int pageNum,
               PageSize newFormat,
               TargetRenderer targetRenderer,
               float scale,
               int topY,
               int pHeight,
               float headerHeight,
               float footerHeight,
               float footnotesHeight)  | 
void | 
startArtifact(String title,
             float width,
             float height,
             String lang,
             String extras)  | 
void | 
startCell(Context.StructTag type,
         boolean skip,
         float lineHeight,
         String title,
         float width,
         float height,
         String lang,
         String extras)  | 
void | 
startFloat(boolean left,
          String title,
          float width,
          float height,
          String lang,
          String extras)  | 
void | 
startHyperlink(String url,
              boolean decorated,
              String title,
              float width,
              float height,
              int id,
              String lang,
              String extras)  | 
boolean | 
startImage(String title,
          float width,
          float height,
          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 pHeight,
            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 | 
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 firstChild,
          float width,
          float height,
          int leftMargin,
          int topMargin,
          int rightMargin,
          int bottomMargin,
          String title,
          String lang,
          String extras)
Required by PDF/UA 
 | 
void | 
startTableSection(Context.StructTag type,
                 String title,
                 float width,
                 float height,
                 String lang,
                 String extras)  | 
void | 
startText(String title,
         float width,
         float height,
         int id,
         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)  | 
boolean | 
usesAwt()  | 
void | 
writeDocument(OutputStream os)  | 
disable, drawHorizontalRule, enable, endBlock, endDecoration, endDestination, endFooter, endGroup, endHeader, fakeParagraph, forcePageOffsetRecalc, getAbsYOffset, getAbsYOffsetOfPageTop, getBackground, getBase, getCurrentPageNumber, getOffsetOnPage, getStrokeWidth, getYOffsetOnPage, isAdjustPositionToLineWidth, isInternalLink, lineBreak, monitorProgressWith, onLastPage, pageBreak, pass, recalcAndGetAbsYOffset, reset, resetWidth, rotate, setAdjustPositionToLineWidth, setAuthorName, setBackground, setBase, setCellBackground, setCustomMetadataRecords, setDescription, setDocumentTitle, setGenerateForms, setHAlignment, setHtmlPageMargins, setInitialPageNumber, setKeywords, setNewWidth, setPageMarkupMode, setSubject, setVAlignment, startDecoration, startDestination, startFooter, startGroup, startHeader, startPre, startsOnPreviousPage, suspendParagraph, toStringaddAbsWrapper, addPageBreak, addPageBreak, addPageNumberRendererRow, alreadyHasPagebreak, buildDestinationPageMap, callDepth, clean, cleanAndResetOffset, countryCodeValid, currentContainer, decreasePageHeight, enterContainer, exitContainer, getAbsWrapper, getContainerWidth, getFullPageHeight, getLastPageBreakOffset, getMaxPageNum, getNewID, getPageHeight, getPageWidth, getRemainingSpaceInRow, hasTocTable, isByPageMarkup, isFlag, isRtf, needsAnchosrLookup, normalizePageBreaks, pageBreaksCount, registerTocDestination, removePagebreaksBelow, resetIdCounter, resetNewContainerWidth, setFlag, setHasTocTable, setHorizontalExtent, setNeedsAnchosrLookup, setNewContainerWidth, setNewHtmlWidth, setPageHeight, setPageWidth, setRemainingSpaceInRow, sortPageBreaks, testTerminationpublic com.pd4ml.pdf.builder.PdfDocumentBuilder doc
public com.pd4ml.util.GOST.Auth license
public PdfRenderContext(PD4ML pd4ml, TargetRenderer targetRenderer, String pdfFormat, float containerWidth, float containerHeight, boolean generateForms, com.pd4ml.fonts.FontCache cache, Vector<StatusMessage> statusMessages, com.pd4ml.util.ProgressMeter progressMeter)
public void setPassword(String password)
public void setPermissions(int permissions)
public boolean generateForms()
generateForms in class TargetRenderContextpublic void simulateNewPage(int pageNum,
                            PageSize newFormat,
                            TargetRenderer targetRenderer,
                            float scale,
                            int topY,
                            int pHeight,
                            float headerHeight,
                            float footerHeight,
                            float footnotesHeight)
simulateNewPage in class TargetRenderContextpublic void startNewPage(int pageNum,
                         PageSize newFormat,
                         TargetRenderer targetRenderer,
                         float scale,
                         int topY,
                         int pHeight,
                         float headerHeight,
                         float footerHeight,
                         float footnotesHeight)
startNewPage in class TargetRenderContextpublic final void applyMatrix(AffineTransform matrix)
applyMatrix in class TargetRenderContextpublic void runHandler(LayoutRect pos, CustomTag handler, float width, float height)
runHandler in class TargetRenderContextpublic void adjustPageScaleParams()
adjustPageScaleParams in class TargetRenderContextpublic void startPageBackgroundMode()
startPageBackgroundMode in class TargetRenderContextpublic void startWatermarkMode(float availableHeight)
startWatermarkMode in class TargetRenderContextpublic void startPageMarkupMode(float availableHeight)
startPageMarkupMode in class TargetRenderContextpublic void endCurrentPaintMode()
endCurrentPaintMode in class TargetRenderContextpublic float getInitialScale()
public void setInitialScale(float initialScale)
public void setScale(float scale)
public float getScale()
public void writeDocument(OutputStream os) throws IOException
IOExceptionpublic com.pd4ml.pdf.parser.PdfDoc getBuilder()
public Color getColor()
getColor in class TargetRenderContextpublic void setColor(Color color)
setColor in class TargetRenderContextpublic void fillRect(Gradient gradient, int x, int y, int w, int h)
fillRect in class TargetRenderContextpublic void fillRect(CachedImage tile, int x, int y, int w, int h, int shiftX, int shiftY, int id)
fillRect in class TargetRenderContextpublic void setClip(int x,
                    int y,
                    int width,
                    int height)
setClip in class TargetRenderContextpublic void setClip(Shape shape)
setClip in class TargetRenderContextpublic void resetClip()
resetClip in class TargetRenderContextpublic void setPaint(Color color)
setPaint in class TargetRenderContextpublic void setStroke(Stroke stroke)
setStroke in class TargetRenderContextpublic void setDottedDashed(boolean dotted,
                            boolean dashed)
setDottedDashed in class TargetRenderContextpublic Object getRenderingHint(RenderingHints.Key key)
getRenderingHint in class TargetRenderContextpublic void setRenderingHint(RenderingHints.Key key, Object value)
setRenderingHint in class TargetRenderContextpublic boolean isInUnitTestMode()
isInUnitTestMode in class TargetRenderContextpublic void addDiagnostics(String text)
addDiagnostics in class TargetRenderContextpublic void setOpacity(float opacity)
setOpacity in class TargetRenderContextpublic void resetOpacity()
resetOpacity in class TargetRenderContextpublic void drawLine(int x1,
                     int y1,
                     int x2,
                     int y2)
drawLine in class TargetRenderContextpublic void draw(Shape path)
draw in class TargetRenderContextpublic void fill(Shape path)
public void drawRect(int x,
                     int y,
                     int width,
                     int height)
drawRect in class TargetRenderContextpublic void drawOval(float x,
                     float y,
                     float width,
                     float height)
drawOval in class TargetRenderContextpublic void fillRect(int x,
                     int y,
                     int width,
                     int height)
fillRect in class TargetRenderContextpublic void drawPolygon(int[] xpoints,
                        int[] ypoints,
                        int npoints)
public void drawPolyline(int[] xpoints,
                         int[] ypoints,
                         int npoints)
public void fillPolygon(int[] xpoints,
                        int[] ypoints,
                        int npoints)
fillPolygon in class TargetRenderContextpublic void drawCustomRect(int x,
                           int y,
                           int width,
                           int height,
                           int[] r1,
                           int[] r2,
                           boolean doubleBorder)
drawCustomRect in class TargetRenderContextpublic void fillCustomRec(int x,
                          int y,
                          int width,
                          int height,
                          int[] r1,
                          int[] r2)
fillCustomRec in class TargetRenderContextpublic void clipCustomRec(int x,
                          int y,
                          int width,
                          int height,
                          int[] r1,
                          int[] r2)
clipCustomRec in class TargetRenderContextpublic 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 TargetRenderContextpublic void fillOval(float x,
                     float y,
                     float width,
                     float height)
fillOval in class TargetRenderContextpublic void setFont(com.pd4ml.fonts.CachedFontMetrics font)
setFont in class TargetRenderContextpublic void drawString(String str, int x, int y)
drawString in class TargetRenderContextpublic void drawString(String str, float x, float y)
drawString in class TargetRenderContextpublic 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 TargetRenderContextpublic void addBookmark(int level,
                        String label,
                        String destinationID,
                        Renderer originator)
addBookmark in class TargetRenderContextpublic void addDestination(float y,
                           String destinationID)
addDestination in class TargetRenderContextpublic void addAnnotation(BBox position, String description)
addAnnotation in class TargetRenderContextpublic void addHyperlink(BBox position, String href, URL base, String label)
addHyperlink in class TargetRenderContextpublic void addJavaScriptAction(String type, String code)
addJavaScriptAction in class TargetRenderContextpublic void embedAttachment(BBox position, com.pd4ml.cache.CachedItem item, String name, String description) throws ForcedTerminationException
embedAttachment in class TargetRenderContextForcedTerminationExceptionpublic void pushGContext()
pushGContext in class TargetRenderContextpublic void popGContext()
popGContext in class TargetRenderContextpublic AffineTransform getCurrentTransform()
getCurrentTransform in class TargetRenderContextpublic 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 TargetRenderContextpublic void registerLink(String name)
registerLink in class TargetRenderContextpublic boolean linkHasLocalDestination(String name)
linkHasLocalDestination in class TargetRenderContextpublic void registerDestination(String name)
registerDestination in class TargetRenderContextpublic boolean destinationReferenced(String name)
destinationReferenced in class TargetRenderContextpublic boolean generateBookmarksFromHeadings()
generateBookmarksFromHeadings in class TargetRenderContextpublic boolean generateBookmarksFromAnchors()
generateBookmarksFromAnchors in class TargetRenderContextpublic void setGenerateBookmarksFromAnchors(boolean generateBookmarksFromAnchors)
public void setGenerateBookmarksFromHeadings(boolean generateBookmarksFromHeadings)
public void applyWatermarkToCurrentPage(String watermarkID, boolean rotated, String alt)
applyWatermarkToCurrentPage in class TargetRenderContextpublic String startWatermarkOutput(float x, float y, PageSize pageSize, float scale, float opacity, float wmscale, float angle, boolean print, boolean screen)
startWatermarkOutput in class TargetRenderContextpublic void endWatermarkOutput()
endWatermarkOutput in class TargetRenderContextpublic void startTable(Color background, boolean firstChild, float width, float height, int leftMargin, int topMargin, int rightMargin, int bottomMargin, String title, String lang, String extras)
startTable in class TargetRenderContextpublic void startTableSection(Context.StructTag type, String title, float width, float height, String lang, String extras)
startTableSection in class TargetRenderContextpublic 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 TargetRenderContextpublic void startCell(Context.StructTag type, boolean skip, float lineHeight, String title, float width, float height, String lang, String extras)
startCell in class TargetRenderContextpublic void endCell(boolean skip)
endCell in class TargetRenderContextpublic void endRow()
endRow in class TargetRenderContextpublic void endTableSection()
endTableSection in class TargetRenderContextpublic void endTable()
endTable in class TargetRenderContextpublic 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 TargetRenderContextpublic void endParagraph()
endParagraph in class TargetRenderContextpublic void startFloat(boolean left,
                       String title,
                       float width,
                       float height,
                       String lang,
                       String extras)
startFloat in class TargetRenderContextpublic void endFloat()
endFloat in class TargetRenderContextpublic void startList(boolean ordered,
                      int type,
                      int hash,
                      String title,
                      float width,
                      float height,
                      String lang,
                      String extras)
startList in class TargetRenderContextpublic void startListItem(int level,
                          boolean ordered,
                          String num,
                          int hash,
                          String title,
                          float width,
                          float height,
                          String lang,
                          String extras)
startListItem in class TargetRenderContextpublic void endListItem(Style.TextAlign align, boolean endsNestedList)
endListItem in class TargetRenderContextpublic void endList()
endList in class TargetRenderContextpublic void startText(String title, float width, float height, int id, String lang, String extras)
startText in class TargetRenderContextpublic void endText(int id)
endText in class TargetRenderContextpublic void startHyperlink(String url, boolean decorated, String title, float width, float height, int id, String lang, String extras)
startHyperlink in class TargetRenderContextpublic void endHyperlink(boolean decorated,
                         int id)
endHyperlink in class TargetRenderContextpublic void startArtifact(String title, float width, float height, String lang, String extras)
startArtifact in class TargetRenderContextpublic void endArtifact()
endArtifact in class TargetRenderContextpublic boolean startImage(String title, float width, float height, String lang, String extras)
startImage in class TargetRenderContextpublic void endImage(boolean nodeCreated)
endImage in class TargetRenderContextpublic boolean inArtifact()
inArtifact in class Contextpublic void setLicense(com.pd4ml.util.GOST.Auth license)
public void rtlMode(boolean enable,
                    boolean paragraph)
rtlMode in class TargetRenderContextRevision 4.0.15 / 20220727-0149