private VerticalPositionMark createVerticalPositionMark( org.openxmlformats.schemas.wordprocessingml.x2006.main.STTabTlc.Enum leader) { if (leader != null) { if (leader == STTabTlc.DOT) { return new DottedLineSeparator(); } else if (leader == STTabTlc.UNDERSCORE) { return new LineSeparator(); } } return new VerticalPositionMark(); }
/** * @see com.lowagie.text.pdf.draw.DrawInterface#draw(com.lowagie.text.pdf.PdfContentByte, float, float, float, float, float) */ public void draw(PdfContentByte canvas, float llx, float lly, float urx, float ury, float y) { canvas.saveState(); drawLine(canvas, llx, urx, y); canvas.restoreState(); }
if (getPercentage() < 0) w = -getPercentage(); else w = (rightX - leftX) * getPercentage() / 100.0f; float s; switch (getAlignment()) { case Element.ALIGN_LEFT: s = 0; break; canvas.setLineWidth(getLineWidth()); if (getLineColor() != null) canvas.setColorStroke(getLineColor()); canvas.moveTo(s + leftX, y + offset); canvas.lineTo(s + w + leftX, y + offset);
private VerticalPositionMark createVerticalPositionMark( org.openxmlformats.schemas.wordprocessingml.x2006.main.STTabTlc.Enum leader) { if (leader != null) { if (leader == STTabTlc.DOT) { return new DottedLineSeparator(); } else if (leader == STTabTlc.UNDERSCORE) { return new LineSeparator(); } } return new VerticalPositionMark(); }
if (getPercentage() < 0) w = -getPercentage(); else w = (rightX - leftX) * getPercentage() / 100.0f; float s; switch (getAlignment()) { case Element.ALIGN_LEFT: s = 0; break; canvas.setLineWidth(getLineWidth()); if (getLineColor() != null) canvas.setColorStroke(getLineColor()); canvas.moveTo(s + leftX, y + offset); canvas.lineTo(s + w + leftX, y + offset);
/** * @see com.lowagie.text.pdf.draw.DrawInterface#draw(com.lowagie.text.pdf.PdfContentByte, float, float, float, float, float) */ public void draw(PdfContentByte canvas, float llx, float lly, float urx, float ury, float y) { canvas.saveState(); drawLine(canvas, llx, urx, y); canvas.restoreState(); }
LineSeparator hr = new LineSeparator(1.0f, 100.0f, null, Element.ALIGN_CENTER, 0); try { current = (TextElementArray) stack.pop();
if (getPercentage() < 0) w = -getPercentage(); else w = (rightX - leftX) * getPercentage() / 100.0f; float s; switch (getAlignment()) { case Element.ALIGN_LEFT: s = 0; break; canvas.setLineWidth(getLineWidth()); if (getLineColor() != null) canvas.setColorStroke(getLineColor()); canvas.moveTo(s + leftX, y + offset); canvas.lineTo(s + w + leftX, y + offset);
/** * @see com.lowagie.text.pdf.draw.DrawInterface#draw(com.lowagie.text.pdf.PdfContentByte, float, float, float, float, float) */ public void draw(PdfContentByte canvas, float llx, float lly, float urx, float ury, float y) { canvas.saveState(); drawLine(canvas, llx, urx, y); canvas.restoreState(); }
LineSeparator hr = new LineSeparator(1.0f, 100.0f, null, Element.ALIGN_CENTER, 0); try { current = (TextElementArray) stack.pop();
currentParagraph.add(new LineSeparator(hrSize, hrWidth, null, hrAlign, currentParagraph.getLeading()/2)); currentParagraph.add(Chunk.NEWLINE); return;
LineSeparator hr = new LineSeparator(1.0f, 100.0f, null, Element.ALIGN_CENTER, 0); try { current = (TextElementArray) stack.pop();
private void addHeaderAndFooter(PdfWriter writer, Document document) { if (document.getPageNumber() == 1) { return; } String header = docInstallArgs.getDocName() + " version" + docInstallArgs.getVersion(); PdfContentByte directContent = writer.getDirectContent(); Phrase headerPhare = ItextUtil.getFontSelector(9, Font.NORMAL, Color.LIGHT_GRAY).process(header); headerPhare.add(new LineSeparator(0.5f, 2.5f, Color.LIGHT_GRAY, Element.ALIGN_LEFT, -5f)); ColumnText.showTextAligned(directContent, Element.ALIGN_LEFT, headerPhare, document.left(), document.top() + 20, 0); String footer = Integer.valueOf(document.getPageNumber()).toString(); ColumnText.showTextAligned(directContent, Element.ALIGN_LEFT, textbFont.process(footer), document.getPageSize().getWidth() / 2.0f - 20, document.bottom() - 20, 0); }
currentParagraph.add(new LineSeparator(hrSize, hrWidth, null, hrAlign, currentParagraph.getLeading()/2)); currentParagraph.add(Chunk.NEWLINE); return;
currentParagraph.add(new LineSeparator(hrSize, hrWidth, null, hrAlign, currentParagraph.getLeading()/2)); currentParagraph.add(Chunk.NEWLINE); return;
LineSeparator hr = new LineSeparator(1.0f, 100.0f, null, Element.ALIGN_CENTER, 0); try { current = (TextElementArray) stack.pop();
private void addPalletNumber(final Document document, final String number) throws DocumentException { LineSeparator lineSeparator = new LineSeparator(1, 100f, ColorUtils.getLineDarkColor(), Element.ALIGN_LEFT, 0); Paragraph numberParagraph = new Paragraph(new Phrase(number, FontUtils.getDejavuBold70Dark())); numberParagraph.setAlignment(Element.ALIGN_CENTER); numberParagraph.setSpacingBefore(70F); numberParagraph.setSpacingAfter(180F); document.add(Chunk.NEWLINE); document.add(numberParagraph); document.add(lineSeparator); }
document.add(numberSmallParagraph); LineSeparator lineSeparator = new LineSeparator(1, 100f, ColorUtils.getLineDarkColor(), Element.ALIGN_LEFT, 0); document.add(lineSeparator);