private void ensureDocumentTagIsOpen() { if (pdf.openMCDocument) { pdf.openMCDocument = false; writer.getDirectContentUnder().openMCBlock(pdf); } }
private void ensureDocumentTagIsOpen() { if (pdf.openMCDocument) { pdf.openMCDocument = false; writer.getDirectContentUnder().openMCBlock(pdf); } }
private PdfPTableBody openTableBlock(PdfPTableBody block, PdfContentByte canvas) { if (canvas.writer.getStandardStructElems().contains(block.getRole())) { canvas.openMCBlock(block); return block; } return null; }
private PdfPTableBody openTableBlock(PdfPTableBody block, PdfContentByte canvas) { if (canvas.writer.getStandardStructElems().contains(block.getRole())) { canvas.openMCBlock(block); return block; } return null; }
canvas.openMCBlock(floatingElement); status = floatingElement.layout(canvas, useAscender, simulate, floatLeftX, minY, floatRightX, yLine); canvas.closeMCBlock(floatingElement);
canvas.openMCBlock(floatingElement); status = floatingElement.layout(canvas, useAscender, simulate, floatLeftX, minY, floatRightX, yLine); canvas.closeMCBlock(floatingElement);
/** * Finishes writing the table. * * @param canvases the array returned by <CODE>beginWritingRows()</CODE> */ public static void endWritingRows(final PdfContentByte[] canvases) { PdfContentByte canvas = canvases[BASECANVAS]; PdfArtifact artifact = new PdfArtifact(); canvas.openMCBlock(artifact); canvas.saveState(); canvas.add(canvases[BACKGROUNDCANVAS]); canvas.restoreState(); canvas.saveState(); canvas.setLineCap(2); canvas.resetRGBColorStroke(); canvas.add(canvases[LINECANVAS]); canvas.restoreState(); canvas.closeMCBlock(artifact); canvas.add(canvases[TEXTCANVAS]); }
background.setBackgroundColor(backgroundColor); PdfArtifact artifact = new PdfArtifact(); canvas.openMCBlock(artifact); canvas.rectangle(background); canvas.closeMCBlock(artifact); canvas.openMCBlock(backgroundImage); canvas.addImage(backgroundImage); canvas.closeMCBlock(backgroundImage);
/** * Finishes writing the table. * * @param canvases the array returned by <CODE>beginWritingRows()</CODE> */ public static void endWritingRows(final PdfContentByte[] canvases) { PdfContentByte canvas = canvases[BASECANVAS]; PdfArtifact artifact = new PdfArtifact(); canvas.openMCBlock(artifact); canvas.saveState(); canvas.add(canvases[BACKGROUNDCANVAS]); canvas.restoreState(); canvas.saveState(); canvas.setLineCap(2); canvas.resetRGBColorStroke(); canvas.add(canvases[LINECANVAS]); canvas.restoreState(); canvas.closeMCBlock(artifact); canvas.add(canvases[TEXTCANVAS]); }
if (isTagged(writer)) { lbl = l.listItem().getListLabel(); graphics.openMCBlock(lbl); symbol = new Chunk(symbol); symbol.setRole(null); text.openMCBlock(l.listItem().getListBody());
if (isTagged(writer)) { lbl = l.listItem().getListLabel(); graphics.openMCBlock(lbl); symbol = new Chunk(symbol); symbol.setRole(null); text.openMCBlock(l.listItem().getListBody());
background.setBackgroundColor(backgroundColor); PdfArtifact artifact = new PdfArtifact(); canvas.openMCBlock(artifact); canvas.rectangle(background); canvas.closeMCBlock(artifact); canvas.openMCBlock(backgroundImage); canvas.addImage(backgroundImage); canvas.closeMCBlock(backgroundImage);
void addAnnotation(final PdfAnnotation annot) { boolean needToTag = isTagged() && annot.getRole() != null && (!(annot instanceof PdfFormField) || ((PdfFormField)annot).getKids() == null); if (needToTag) { openMCBlock(annot); } writer.addAnnotation(annot); if (needToTag) { PdfStructureElement strucElem = pdf.getStructElement(annot.getId()); if (strucElem != null) { int structParent = pdf.getStructParentIndex(annot); annot.put(PdfName.STRUCTPARENT, new PdfNumber(structParent)); strucElem.setAnnotation(annot, getCurrentPage()); writer.getStructureTreeRoot().setAnnotationMark(structParent, strucElem.getReference()); } closeMCBlock(annot); } }
void addAnnotation(final PdfAnnotation annot) { boolean needToTag = isTagged() && annot.getRole() != null && (!(annot instanceof PdfFormField) || ((PdfFormField)annot).getKids() == null); if (needToTag) { openMCBlock(annot); } writer.addAnnotation(annot); if (needToTag) { PdfStructureElement strucElem = pdf.getStructElement(annot.getId()); if (strucElem != null) { int structParent = pdf.getStructParentIndex(annot); annot.put(PdfName.STRUCTPARENT, new PdfNumber(structParent)); strucElem.setAnnotation(annot, getCurrentPage()); writer.getStructureTreeRoot().setAnnotationMark(structParent, strucElem.getReference()); } closeMCBlock(annot); } }
if (!simulate) { ListLabel lbl = ((ListItem) elementToGo).getListLabel(); canvas.openMCBlock(lbl); Chunk symbol = new Chunk(((ListItem) elementToGo).getListSymbol()); symbol.setRole(null); canvas.openMCBlock(lBody); lBody = null;
template.getMcElements().add(allMcElements.get(allMcElements.size() - 1)); } else { openMCBlock(template);
if (!simulate) { ListLabel lbl = ((ListItem) elementToGo).getListLabel(); canvas.openMCBlock(lbl); Chunk symbol = new Chunk(((ListItem) elementToGo).getListSymbol()); symbol.setRole(null); canvas.openMCBlock(lBody); lBody = null;
template.getMcElements().add(allMcElements.get(allMcElements.size() - 1)); } else { openMCBlock(template);
endText(); artifact = new PdfArtifact(); openMCBlock(artifact);
endText(); artifact = new PdfArtifact(); openMCBlock(artifact);