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) { if (drawInterface != null) { drawInterface.draw(canvas, llx, lly, urx, ury, y + offset); } }
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 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); }
/** * @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(); canvas.setLineWidth(lineWidth); canvas.setLineCap(PdfContentByte.LINE_CAP_ROUND); canvas.setLineDash(0, gap, gap / 2); drawLine(canvas, llx, urx, y); canvas.restoreState(); }
/** * @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(); }
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); }
/** * @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) { if (drawInterface != null) { drawInterface.draw(canvas, llx, lly, urx, ury, 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(); canvas.setLineWidth(lineWidth); canvas.setLineCap(PdfContentByte.LINE_CAP_ROUND); canvas.setLineDash(0, gap, gap / 2); drawLine(canvas, llx, urx, y); canvas.restoreState(); }
/** * @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);
document.add(numberSmallParagraph); LineSeparator lineSeparator = new LineSeparator(1, 100f, ColorUtils.getLineDarkColor(), Element.ALIGN_LEFT, 0); document.add(lineSeparator);
/** * @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) { if (drawInterface != null) { drawInterface.draw(canvas, llx, lly, urx, ury, 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(); canvas.setLineWidth(lineWidth); canvas.setLineCap(PdfContentByte.LINE_CAP_ROUND); canvas.setLineDash(0, gap, gap / 2); drawLine(canvas, llx, urx, y); canvas.restoreState(); }
/** * @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 (!simulate) { DrawInterface zh = (DrawInterface)element; zh.draw(canvas, leftX, minY, rightX, maxY, yLine);
if (!simulate) { DrawInterface zh = (DrawInterface)element; zh.draw(canvas, leftX, minY, rightX, maxY, yLine);
if (!simulate) { DrawInterface zh = (DrawInterface)element; zh.draw(canvas, leftX, minY, rightX, maxY, yLine);