Package com.itextpdf.text.pdf

Examples of com.itextpdf.text.pdf.PdfContentByte.stroke()


    private static void splitLine(Document doc, PdfWriter writer) {
        PdfContentByte cb = writer.getDirectContentUnder();
        cb.moveTo(doc.right() / 2, doc.bottom());
        cb.lineTo(doc.right() / 2, doc.top());
        cb.stroke();
    }

    private static void booklet(String input) throws Exception {
        String output = input.replace(".pdf", "-booklet.pdf");
        PdfReader reader = new PdfReader(input);
View Full Code Here


      PdfContentByte pc = writer.getDirectContent();
      pc.setColorStroke(BaseColor.BLACK);
      pc.setLineWidth(0.5f);
      pc.moveTo(left, bottom - 5);
      pc.lineTo(right, bottom - 5);
      pc.stroke();
      pc.moveTo(left, bottom - 25);
      pc.lineTo(right, bottom - 25);
      pc.stroke();

      ColumnText.showTextAligned(pc,Element.ALIGN_CENTER,new Phrase(footer + " " + pagenumber, FontFactory.getFont(FontFactory.HELVETICA, 8, Font.NORMAL)), (left + right) / 2,bottom - 18, 0);
View Full Code Here

      pc.moveTo(left, bottom - 5);
      pc.lineTo(right, bottom - 5);
      pc.stroke();
      pc.moveTo(left, bottom - 25);
      pc.lineTo(right, bottom - 25);
      pc.stroke();

      ColumnText.showTextAligned(pc,Element.ALIGN_CENTER,new Phrase(footer + " " + pagenumber, FontFactory.getFont(FontFactory.HELVETICA, 8, Font.NORMAL)), (left + right) / 2,bottom - 18, 0);
    }
  }
View Full Code Here

                    cb.fill();
            }
            break;
        case STROKE:
            if (traces > 0)
                cb.stroke();
            break;
        default: // drawType==CLIP
            if (traces == 0)
                cb.rectangle(0, 0, 0, 0);
            if (points.getWindingRule() == PathIterator.WIND_EVEN_ODD)
View Full Code Here

        cb.moveTo(-10, 0);
        cb.lineTo(10, 0);
        cb.moveTo(0, -10);
        cb.lineTo(0, 10);
        cb.stroke();
       
        cb.beginText();
        cb.setFontAndSize(font, 12);
        cb.transform(AffineTransform.getRotateInstance(rotation/180f*Math.PI));
        cb.showText(text1);
View Full Code Here

                float alpha = color.getAlpha() / 255f;
                PdfGState gState = new PdfGState();
                gState.setStrokeOpacity(alpha);
                cb.setGState(gState);
            }
            cb.stroke();
            if (color.getAlpha() < 255) {
                cb.restoreState();
            }
        }
    }
View Full Code Here

                float alpha = color.getAlpha() / 255f;
                PdfGState gState = new PdfGState();
                gState.setStrokeOpacity(alpha);
                cb.setGState(gState);
            }
            cb.stroke();
            if (color.getAlpha() < 255) {
                cb.restoreState();
            }
        }
    }
View Full Code Here

                float alpha = color.getAlpha() / 255f;
                PdfGState gState = new PdfGState();
                gState.setStrokeOpacity(alpha);
                cb.setGState(gState);
            }
            cb.stroke();
            if (color.getAlpha() < 255) {
                cb.restoreState();
            }
        }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.