Class StandardPdfProducer.MarkedContentCanvas

java.lang.Object
com.lowagie.text.pdf.PdfContentByte
net.sf.jasperreports.pdf.classic.producer.StandardPdfProducer.MarkedContentCanvas
Enclosing class:
StandardPdfProducer

public class StandardPdfProducer.MarkedContentCanvas extends com.lowagie.text.pdf.PdfContentByte
Content byte that opens and closes the marked content sequences of the chunks that carry a structure element, as the text of a phrase is written.

A marked content sequence that is referenced from the structure tree has to be opened and closed in between the text showing operators of the chunks, and the PDF library offers no hook for that. Writing the operators from the generic tag page event is not an option either: the text of a column goes to a duplicate of the canvas that the column was created with and is only appended to that canvas once the whole column has been laid out, so anything written to the canvas from the event would end up before all of the text. Instead, the phrase is laid out on one of these content bytes, whose duplicate is one as well, and the text showing methods of the duplicate open the sequence of the chunk that the page event announced just before.

Consecutive chunks that carry the same structure element share a single sequence, and the sequences are closed at the end of the text object, so that they stay properly nested inside it.

  • Field Summary

    Fields inherited from class com.lowagie.text.pdf.PdfContentByte

    ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, content, layerDepth, LINE_CAP_BUTT, LINE_CAP_PROJECTING_SQUARE, LINE_CAP_ROUND, LINE_JOIN_BEVEL, LINE_JOIN_MITER, LINE_JOIN_ROUND, pdf, separator, state, stateList, TEXT_RENDER_MODE_CLIP, TEXT_RENDER_MODE_FILL, TEXT_RENDER_MODE_FILL_CLIP, TEXT_RENDER_MODE_FILL_STROKE, TEXT_RENDER_MODE_FILL_STROKE_CLIP, TEXT_RENDER_MODE_INVISIBLE, TEXT_RENDER_MODE_STROKE, TEXT_RENDER_MODE_STROKE_CLIP, writer
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    MarkedContentCanvas(com.lowagie.text.pdf.PdfWriter pdfWriter)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
     
    void
     
    com.lowagie.text.pdf.PdfContentByte
     
    void
    showText(com.lowagie.text.pdf.PdfTextArray text)
     
    void
     
    protected void
     

    Methods inherited from class com.lowagie.text.pdf.PdfContentByte

    add, addImage, addImage, addImage, addImage, addOutline, addPSXObject, addTemplate, addTemplate, addTemplate, arc, beginLayer, beginMarkedContentSequence, beginMarkedContentSequence, beginMarkedContentSequence, beginMarkedContentSequence, beginText, bezierArc, checkWriter, circle, clip, closePath, closePathEoFillStroke, closePathFillStroke, closePathStroke, concatCTM, createAppearance, createGraphics, createGraphics, createGraphics, createGraphics, createGraphicsShapes, createGraphicsShapes, createPattern, createPattern, createPattern, createPattern, createPrinterGraphics, createPrinterGraphics, createPrinterGraphics, createPrinterGraphics, createPrinterGraphicsShapes, createPrinterGraphicsShapes, createTemplate, curveFromTo, curveTo, curveTo, drawButton, drawRadioField, drawTextField, ellipse, endLayer, endMarkedContentSequence, eoClip, eoFill, eoFillStroke, fill, fillStroke, getCharacterSpacing, getEffectiveStringWidth, getHorizontalScaling, getInternalBuffer, getKernArray, getLeading, getPdfDocument, getPdfWriter, getRootOutline, getWordSpacing, getXTLM, getYTLM, lineTo, localDestination, localGoto, moveText, moveTextWithLeading, moveTo, newlineShowText, newlineShowText, newlineText, newPath, paintShading, paintShading, rectangle, rectangle, remoteGoto, remoteGoto, reset, reset, resetCMYKColorFill, resetCMYKColorStroke, resetGrayFill, resetGrayStroke, resetRGBColorFill, resetRGBColorStroke, restoreState, roundRectangle, sanityCheck, saveState, setAction, setCharacterSpacing, setCMYKColorFill, setCMYKColorFillF, setCMYKColorFillF, setCMYKColorStroke, setCMYKColorStrokeF, setCMYKColorStrokeF, setColorFill, setColorFill, setColorStroke, setColorStroke, setDefaultColorspace, setFlatness, setFontAndSize, setGrayFill, setGrayFill, setGrayStroke, setGrayStroke, setGState, setHorizontalScaling, setLeading, setLineCap, setLineDash, setLineDash, setLineDash, setLineDash, setLineJoin, setLineWidth, setLiteral, setLiteral, setLiteral, setMiterLimit, setPatternFill, setPatternFill, setPatternFill, setPatternStroke, setPatternStroke, setPatternStroke, setRGBColorFill, setRGBColorFill, setRGBColorFillF, setRGBColorFillF, setRGBColorStroke, setRGBColorStroke, setRGBColorStrokeF, setShadingFill, setShadingStroke, setTextMatrix, setTextMatrix, setTextRenderingMode, setTextRise, setWordSpacing, showText, showText, showTextAligned, showTextAlignedKerned, showTextBasic, showTextKerned, stroke, toPdf, toString, transform, variableRectangle

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • MarkedContentCanvas

      protected MarkedContentCanvas(com.lowagie.text.pdf.PdfWriter pdfWriter)
  • Method Details

    • getDuplicate

      public com.lowagie.text.pdf.PdfContentByte getDuplicate()
      Overrides:
      getDuplicate in class com.lowagie.text.pdf.PdfContentByte
    • showText

      public void showText(String text)
      Overrides:
      showText in class com.lowagie.text.pdf.PdfContentByte
    • showText

      public void showText(com.lowagie.text.pdf.PdfTextArray text)
      Overrides:
      showText in class com.lowagie.text.pdf.PdfContentByte
    • endText

      public void endText()
      Overrides:
      endText in class com.lowagie.text.pdf.PdfContentByte
    • switchMarkedContent

      protected void switchMarkedContent()
    • endMarkedContent

      protected void endMarkedContent()