public PdfContentByte getDuplicate(boolean inheritGraphicState) { PdfContentByte cb = this.getDuplicate(); if (inheritGraphicState) { cb.state = state; cb.stateList = stateList; } return cb; }
public PdfContentByte getDuplicate(boolean inheritGraphicState) { PdfContentByte cb = this.getDuplicate(); if (inheritGraphicState) { cb.state = state; cb.stateList = stateList; } return cb; }
/** * Gets and initializes the 4 layers where the table is written to. The text * or graphics are added to one of the 4 <CODE>PdfContentByte</CODE> * returned with the following order: * <p> * <ul> * <li><CODE>PdfPtable.BASECANVAS</CODE> - the original * <CODE>PdfContentByte</CODE>. Anything placed here will be under the * table. * <li><CODE>PdfPtable.BACKGROUNDCANVAS</CODE> - the layer where the * background goes to. * <li><CODE>PdfPtable.LINECANVAS</CODE> - the layer where the lines go to. * <li><CODE>PdfPtable.TEXTCANVAS</CODE> - the layer where the text go to. * Anything placed here will be over the table. * </ul><p> * The layers are placed in sequence on top of each other. * * @param canvas the <CODE>PdfContentByte</CODE> where the rows will be * written to * @return an array of 4 <CODE>PdfContentByte</CODE> * @see #writeSelectedRows(int, int, float, float, PdfContentByte[]) */ public static PdfContentByte[] beginWritingRows(final PdfContentByte canvas) { return new PdfContentByte[]{ canvas, canvas.getDuplicate(), canvas.getDuplicate(), canvas.getDuplicate(),}; }
/** * Gets and initializes the 4 layers where the table is written to. The text * or graphics are added to one of the 4 <CODE>PdfContentByte</CODE> * returned with the following order: * <p> * <ul> * <li><CODE>PdfPtable.BASECANVAS</CODE> - the original * <CODE>PdfContentByte</CODE>. Anything placed here will be under the * table. * <li><CODE>PdfPtable.BACKGROUNDCANVAS</CODE> - the layer where the * background goes to. * <li><CODE>PdfPtable.LINECANVAS</CODE> - the layer where the lines go to. * <li><CODE>PdfPtable.TEXTCANVAS</CODE> - the layer where the text go to. * Anything placed here will be over the table. * </ul><p> * The layers are placed in sequence on top of each other. * * @param canvas the <CODE>PdfContentByte</CODE> where the rows will be * written to * @return an array of 4 <CODE>PdfContentByte</CODE> * @see #writeSelectedRows(int, int, float, float, PdfContentByte[]) */ public static PdfContentByte[] beginWritingRows(final PdfContentByte canvas) { return new PdfContentByte[]{ canvas, canvas.getDuplicate(), canvas.getDuplicate(), canvas.getDuplicate(),}; }
/** * Constructs a <CODE>PdfWriter</CODE>. * <P> * Remark: a PdfWriter can only be constructed by calling the method * <CODE>getInstance(Document document, OutputStream os)</CODE>. * * @param document The <CODE>PdfDocument</CODE> that has to be written * @param os The <CODE>OutputStream</CODE> the writer has to write to. */ protected PdfWriter(final PdfDocument document, final OutputStream os) { super(document, os); pdf = document; directContentUnder = new PdfContentByte(this); directContent = directContentUnder.getDuplicate(); }
/** * Constructs a <CODE>PdfWriter</CODE>. * <P> * Remark: a PdfWriter can only be constructed by calling the method * <CODE>getInstance(Document document, OutputStream os)</CODE>. * * @param document The <CODE>PdfDocument</CODE> that has to be written * @param os The <CODE>OutputStream</CODE> the writer has to write to. */ protected PdfWriter(final PdfDocument document, final OutputStream os) { super(document, os); pdf = document; directContentUnder = new PdfContentByte(this); directContent = directContentUnder.getDuplicate(); }
g2.jpegQuality = this.jpegQuality; g2.setFont(this.font); g2.cb = this.cb.getDuplicate(); g2.cb.saveState(); g2.width = this.width;
PdfContentByte graphics = null; if (text != null) { graphics = text.getDuplicate();
PdfContentByte graphics = null; if (text != null) { graphics = text.getDuplicate();
graphics = writer.getDirectContentUnder().getDuplicate(); writer.getDirectContent().duplicatedFrom = graphics; } else {
graphics = writer.getDirectContentUnder().getDuplicate(); writer.getDirectContent().duplicatedFrom = graphics; } else {
pdf = canvas.getPdfDocument(); if (!isTagged(canvas)) { text = canvas.getDuplicate(inheritGraphicState); } else { text = canvas;
pdf = canvas.getPdfDocument(); if (!isTagged(canvas)) { text = canvas.getDuplicate(inheritGraphicState); } else { text = canvas;