/** * Starts the writing of text. */ public void beginText() { beginText(false); }
/** * Starts the writing of text. */ public void beginText() { beginText(false); }
/** * 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 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 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 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 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 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); }
/** * 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 text leading parameter. * <P> * The leading parameter is measured in text space units. It specifies the vertical distance * between the baselines of adjacent lines of text.</P> * * @param leading the new leading */ public void setLeading(final float leading) { if (!inText && isTagged()) { beginText(true); } state.leading = leading; content.append(leading).append(" TL").append_i(separator); }
/** * 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); }
/** * 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); }
/** * Shows the <CODE>text</CODE>. * * @param text the text to write */ public void showText(final String text) { checkState(); if (!inText && isTagged()) { beginText(true); } showText2(text); updateTx(text, 0); content.append("Tj").append_i(separator); }
/** * Moves to the next line and shows <CODE>text</CODE>. * * @param text the text to write */ public void newlineShowText(final String text) { checkState(); if (!inText && isTagged()) { beginText(true); } state.yTLM -= state.leading; showText2(text); content.append("'").append_i(separator); state.tx = state.xTLM; updateTx(text, 0); }
/** * Shows the <CODE>text</CODE>. * * @param text the text to write */ public void showText(final String text) { checkState(); if (!inText && isTagged()) { beginText(true); } showText2(text); updateTx(text, 0); content.append("Tj").append_i(separator); }