protected ArrayList<IAccessibleElement> saveMCBlocks() { ArrayList<IAccessibleElement> mc = new ArrayList<IAccessibleElement>(); if (isTagged()) { mc = getMcElements(); for (int i = 0; i < mc.size(); i++) { closeMCBlockInt(mc.get(i)); } setMcElements(new ArrayList<IAccessibleElement>()); } return mc; }
/** * Moves to the start of the next line. */ public void newlineText() { if (!inText && isTagged()) { beginText(true); } if (isTagged() && state.xTLM != state.tx) { setTextMatrix(state.aTLM, state.bTLM, state.cTLM, state.dTLM, state.xTLM, state.yTLM); } state.yTLM -= state.leading; content.append("T*").append_i(separator); }
public void closeMCBlock(IAccessibleElement element) { if (isTagged() && element != null/* && element.getRole() != null*/) { if (getMcElements().contains(element)) { closeMCBlockInt(element); getMcElements().remove(element); } } }
public void closeMCBlock(IAccessibleElement element) { if (isTagged() && element != null/* && element.getRole() != null*/) { if (getMcElements().contains(element)) { closeMCBlockInt(element); getMcElements().remove(element); } } }
protected void restoreMCBlocks(ArrayList<IAccessibleElement> mcElements) { if (isTagged() && mcElements != null) { setMcElements(mcElements); for (int i = 0; i < this.getMcElements().size(); i++) { openMCBlockInt(this.getMcElements().get(i)); } } }
protected void restoreMCBlocks(ArrayList<IAccessibleElement> mcElements) { if (isTagged() && mcElements != null) { setMcElements(mcElements); for (int i = 0; i < this.getMcElements().size(); i++) { openMCBlockInt(this.getMcElements().get(i)); } } }
/** * Modify the current clipping path by intersecting it with the current path, using the * even-odd rule to determine which regions lie inside the clipping path. */ public void eoClip() { if (inText && isTagged()) { endText(); } content.append("W*").append_i(separator); }
/** * Modify the current clipping path by intersecting it with the current path, using the * nonzero winding number rule to determine which regions lie inside the clipping * path. */ public void clip() { if (inText && isTagged()) { endText(); } content.append("W").append_i(separator); }
/** * Modify the current clipping path by intersecting it with the current path, using the * even-odd rule to determine which regions lie inside the clipping path. */ public void eoClip() { if (inText && isTagged()) { endText(); } content.append("W*").append_i(separator); }
/** * Saves the graphic state. <CODE>saveState</CODE> and * <CODE>restoreState</CODE> must be balanced. */ public void saveState() { PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_CANVAS, "q"); if (inText && isTagged()) { endText(); } content.append("q").append_i(separator); stateList.add(new GraphicState(state)); }
/** * Sets the text rendering parameter. * * @param rendering a parameter */ public void setTextRenderingMode(final int rendering) { if (!inText && isTagged()) { beginText(true); } state.textRenderMode = rendering; content.append(rendering).append(" Tr").append_i(separator); }
public void showTextGid(final String gids) { checkState(); if (!inText && isTagged()) { beginText(true); } if (state.fontDetails == null) throw new NullPointerException(MessageLocalization.getComposedMessage("font.and.size.must.be.set.before.writing.any.text")); Object[] objs = state.fontDetails.convertToBytesGid(gids); StringUtils.escapeString((byte[]) objs[0], content); state.tx += ((Integer)objs[2]).intValue() * 0.001f * state.size; content.append("Tj").append_i(separator); }
/** * Sets the word spacing parameter. * * @param wordSpace a parameter */ public void setWordSpacing(final float wordSpace) { if (!inText && isTagged()) { beginText(true); } state.wordSpace = wordSpace; content.append(wordSpace).append(" Tw").append_i(separator); }
/** * Sets the horizontal scaling parameter. * * @param scale a parameter */ public void setHorizontalScaling(final float scale) { if (!inText && isTagged()) { beginText(true); } state.scale = scale; content.append(scale).append(" Tz").append_i(separator); }
/** * Sets the text rise parameter. * <P> * This allows to write text in subscript or superscript mode.</P> * * @param rise a parameter */ public void setTextRise(final double rise) { if (!inText && isTagged()) { beginText(true); } content.append(rise).append(" Ts").append_i(separator); }
/** * Sets the character spacing parameter. * * @param charSpace a parameter */ public void setCharacterSpacing(final float charSpace) { if (!inText && isTagged()) { beginText(true); } state.charSpace = charSpace; content.append(charSpace).append(" Tc").append_i(separator); }
/** * Sets the word spacing parameter. * * @param wordSpace a parameter */ public void setWordSpacing(final float wordSpace) { if (!inText && isTagged()) { beginText(true); } state.wordSpace = wordSpace; content.append(wordSpace).append(" Tw").append_i(separator); }
public void showTextGid(final String gids) { checkState(); if (!inText && isTagged()) { beginText(true); } if (state.fontDetails == null) throw new NullPointerException(MessageLocalization.getComposedMessage("font.and.size.must.be.set.before.writing.any.text")); Object[] objs = state.fontDetails.convertToBytesGid(gids); StringUtils.escapeString((byte[]) objs[0], content); state.tx += ((Integer)objs[2]).intValue() * 0.001f * state.size; content.append("Tj").append_i(separator); }
/** * Sets the text rise parameter. * <P> * This allows to write text in subscript or superscript mode.</P> * * @param rise a parameter */ public void setTextRise(final double rise) { if (!inText && isTagged()) { beginText(true); } content.append(rise).append(" Ts").append_i(separator); }
/** * Ends the path without filling or stroking it. */ public void newPath() { if (inText) { if (isTagged()) { endText(); } else { throw new IllegalPdfSyntaxException(MessageLocalization.getComposedMessage("path.construction.operator.inside.text.object")); } } content.append("n").append_i(separator); }