Search in sources :

Example 61 with Paragraph

use of com.itextpdf.layout.element.Paragraph in project ComponentManagement by Bac3Phi.

the class ReportInventoriesController method addTitlePage.

private void addTitlePage(Document document) throws IOException {
    Paragraph title = new Paragraph("BÁO CÁO HÀNG TỒN");
    // Setting font of the text
    title.setFont(font_bold);
    title.setFontSize(22);
    title.setTextAlignment(TextAlignment.CENTER);
    document.add(title);
}
Also used : Paragraph(com.itextpdf.layout.element.Paragraph)

Example 62 with Paragraph

use of com.itextpdf.layout.element.Paragraph in project ComponentManagement by Bac3Phi.

the class ReportPaymentController method addHeader.

private void addHeader(String strheader, Document document) throws IOException {
    Paragraph header = new Paragraph(strheader);
    // Setting font of the text
    header.setFont(font_bold);
    header.setFontSize(14);
    header.setTextAlignment(TextAlignment.LEFT);
    document.add(header);
}
Also used : Paragraph(com.itextpdf.layout.element.Paragraph)

Example 63 with Paragraph

use of com.itextpdf.layout.element.Paragraph in project ComponentManagement by Bac3Phi.

the class ReportPaymentController method addDate.

private void addDate(Document document) throws IOException {
    Paragraph date;
    if (rdbtnMonth.isSelected()) {
        date = new Paragraph("Tháng: " + txtMonth.getText() + "/" + txtYear.getText());
    } else
        date = new Paragraph("Quý: " + txtMonth.getText() + "/" + txtYear.getText());
    // Setting font of the text
    date.setFont(font);
    date.setFontSize(12);
    date.setTextAlignment(TextAlignment.CENTER);
    document.add(date);
}
Also used : Paragraph(com.itextpdf.layout.element.Paragraph)

Example 64 with Paragraph

use of com.itextpdf.layout.element.Paragraph in project ComponentManagement by Bac3Phi.

the class ReportPaymentController method addTitlePage.

private void addTitlePage(Document document) throws IOException {
    Paragraph title = new Paragraph("Báo Cáo Thu Chi");
    // Setting font of the text
    title.setFont(font_bold);
    title.setFontSize(22);
    title.setTextAlignment(TextAlignment.CENTER);
    document.add(title);
}
Also used : Paragraph(com.itextpdf.layout.element.Paragraph)

Example 65 with Paragraph

use of com.itextpdf.layout.element.Paragraph in project ComponentManagement by Bac3Phi.

the class InventoriesReportController method addTitlePage.

private void addTitlePage(Document document) throws IOException {
    Paragraph title = new Paragraph("BÁO CÁO HÀNG TỒN");
    // Setting font of the text
    PdfFont font = PdfFontFactory.createFont(FontConstants.TIMES_BOLD);
    title.setFont(font);
    title.setFontSize(22);
    title.setTextAlignment(TextAlignment.CENTER);
    document.add(title);
}
Also used : PdfFont(com.itextpdf.kernel.font.PdfFont) Paragraph(com.itextpdf.layout.element.Paragraph)

Aggregations

Paragraph (com.itextpdf.layout.element.Paragraph)128 PdfDocument (com.itextpdf.kernel.pdf.PdfDocument)109 PdfWriter (com.itextpdf.kernel.pdf.PdfWriter)109 Document (com.itextpdf.layout.Document)103 PdfFont (com.itextpdf.kernel.font.PdfFont)45 HyphenationConfig (com.itextpdf.layout.hyphenation.HyphenationConfig)29 BufferedReader (java.io.BufferedReader)26 FileReader (java.io.FileReader)26 Table (com.itextpdf.layout.element.Table)22 Cell (com.itextpdf.layout.element.Cell)21 AreaBreak (com.itextpdf.layout.element.AreaBreak)20 Image (com.itextpdf.layout.element.Image)20 List (java.util.List)17 CsvTo2DList (com.itextpdf.highlevel.util.CsvTo2DList)16 Text (com.itextpdf.layout.element.Text)16 Rectangle (com.itextpdf.kernel.geom.Rectangle)15 PdfCanvas (com.itextpdf.kernel.pdf.canvas.PdfCanvas)14 Tab (com.itextpdf.layout.element.Tab)13 ArrayList (java.util.ArrayList)13 TabStop (com.itextpdf.layout.element.TabStop)12