protected void setNewPageSizeAndMargins() { pageSize = nextPageSize; if (marginMirroring && (getPageNumber() & 1) == 0) { marginRight = nextMarginLeft; marginLeft = nextMarginRight; } else { marginLeft = nextMarginLeft; marginRight = nextMarginRight; } if (marginMirroringTopBottom && (getPageNumber() & 1) == 0) { marginTop = nextMarginBottom; marginBottom = nextMarginTop; } else { marginTop = nextMarginTop; marginBottom = nextMarginBottom; } if (!isTagged(writer)) { text = new PdfContentByte(writer); text.reset(); } else { text = graphics; } text.beginText(); // we move to the left/top position of the page text.moveText(left(), top()); if (isTagged(writer)) textEmptySize = text.size(); }
protected void setNewPageSizeAndMargins() { pageSize = nextPageSize; if (marginMirroring && (getPageNumber() & 1) == 0) { marginRight = nextMarginLeft; marginLeft = nextMarginRight; } else { marginLeft = nextMarginLeft; marginRight = nextMarginRight; } if (marginMirroringTopBottom && (getPageNumber() & 1) == 0) { marginTop = nextMarginBottom; marginBottom = nextMarginTop; } else { marginTop = nextMarginTop; marginBottom = nextMarginBottom; } if (!isTagged(writer)) { text = new PdfContentByte(writer); text.reset(); } else { text = graphics; } text.beginText(); // we move to the left/top position of the page text.moveText(left(), top()); if (isTagged(writer)) textEmptySize = text.size(); }
text.setTextMatrix(indentLeft(), fl.getYLine()); } else { text.moveText(0, fl.getYLine() - indentTop() + currentHeight);
text.setTextMatrix(indentLeft(), fl.getYLine()); } else { text.moveText(0, fl.getYLine() - indentTop() + currentHeight);
if (line.isNewlineSplit() && line.widthLeft() >= lastBaseFactor * (ratio * numberOfSpaces + lineLen - 1)) { if (line.isRTL()) { text.moveText(line.widthLeft() - lastBaseFactor * (ratio * numberOfSpaces + lineLen - 1), 0); graphics.beginText(true); text.moveText(xMarker + lastBaseFactor + chunk.getImageWidth() - text.getXTLM(), 0); text.moveText(baseXMarker - text.getXTLM(), 0); currentValues[0] = currentFont; currentValues[1] = new Float(lastBaseFactor);
if (line.isNewlineSplit() && line.widthLeft() >= lastBaseFactor * (ratio * numberOfSpaces + lineLen - 1)) { if (line.isRTL()) { text.moveText(line.widthLeft() - lastBaseFactor * (ratio * numberOfSpaces + lineLen - 1), 0); graphics.beginText(true); text.moveText(xMarker + lastBaseFactor + chunk.getImageWidth() - text.getXTLM(), 0); text.moveText(baseXMarker - text.getXTLM(), 0); currentValues[0] = currentFont; currentValues[1] = new Float(lastBaseFactor);
text.setTextMatrix(indentLeft(), ct.getYLine()); } else { text.moveText(0, ct.getYLine() - indentTop() + currentHeight);
text.setTextMatrix(indentLeft(), ct.getYLine()); } else { text.moveText(0, ct.getYLine() - indentTop() + currentHeight);
currentHeight += image.getScaledHeight() + diff; flushLines(); text.moveText(0, - (image.getScaledHeight() + diff)); newLine();
currentHeight += image.getScaledHeight() + diff; flushLines(); text.moveText(0, - (image.getScaledHeight() + diff)); newLine();