Example usage for com.itextpdf.text Font setSize

List of usage examples for com.itextpdf.text Font setSize

Introduction

In this page you can find the example usage for com.itextpdf.text Font setSize.

Prototype

public void setSize(final float size) 

Source Link

Document

Sets the size.

Usage

From source file:com.planning.project.controller.CreatePDF.java

/**
 * @param args/*  ww  w.  ja  v a2  s.co m*/
 * @throws Exception
 */
public static Document createPDFBudwork(String file, TbDescriptionstatement tbDescriptionstatement,
        List<TbAddmoneyvara> tbAddmoneyvaras, List<TbAddmoneynovara> tbAddmoneynovaras,
        List<TbRemunerationcommittee> tbRemunerationcommittees, List<TbMaketimeformeal> tbMaketimeformeals,
        List<TbRentshouse> tbRentshouses, List<TbTeachextra> tbTeachextras, List<TbExpenpaper> tbExpenpapers,
        List<TbComlecturer> tbComlecturers, List<TbOthercompensation> tbOthercompensations,
        List<TbAllowancesrental> tbAllowancesrentals, List<TbRepairofequipment> tbRepairofequipments,
        List<TbWageservice> tbWageservices, List<TbMeetingofthesnack> tbMeetingofthesnacks,
        List<TbSocialsecurity> tbSocialsecuritys, List<TbRentalproperty> tbRentalpropertys,
        List<TbThecertificationfood> tbThecertificationfoods,
        List<TbThecertificationdrink> tbThecertificationdrinks, List<TbThegift> tbThegifts, List<TbTax> tbTaxs,
        List<TbFee> tbFees, List<TbInsurance> tbInsurances, List<TbEmploy> tbEmploys,
        List<TbMaterial> tbMaterials1, List<TbMaterial> tbMaterials2, List<TbMaterial> tbMaterials3,
        List<TbMaterial> tbMaterials4, List<TbMaterial> tbMaterials5, List<TbMaterial> tbMaterials6,
        List<TbMaterial> tbMaterials7, List<TbMaterial> tbMaterials8, List<TbMaterial> tbMaterials9,
        List<TbMaterial> tbMaterials10, List<TbMaterial> tbMaterials11, List<TbPublicutility> tbPublicutilitys,
        List<TbGasolineDetail> tbGasolineDetails) throws Exception {

    Document document = null;

    try {
        Font font16 = new Font(
                BaseFont.createFont("D:/THSarabunNew.ttf", BaseFont.IDENTITY_H, BaseFont.EMBEDDED));
        font16.setSize(16);
        document = new Document();
        PdfWriter.getInstance(document, new FileOutputStream(file));
        document.open();
        Paragraph paragraph = new Paragraph();

        addMetaData(document);

        addTitlePageBud(document);

        createPagePDFBudwork(document, tbDescriptionstatement);

        createHeadlistBudwork(document, "1");

        PdfPTable table = createtableAddmoneyvara(tbAddmoneyvaras, tbDescriptionstatement.getSumAddmoneyvara());
        document.add(table);
        table.setSpacingBefore(25);

        table = createtableAddmoneynovara(tbAddmoneynovaras, tbDescriptionstatement.getSumAddmoneynovara());
        table.setSpacingBefore(25);
        document.add(table);

        table = createtableRemunerationcommittee(tbRemunerationcommittees,
                tbDescriptionstatement.getSumRemunerationcomnittee());
        table.setSpacingBefore(25);
        document.add(table);

        table = createtableMaketimeformeal(tbMaketimeformeals, tbDescriptionstatement.getSumMaketimeformeals());
        table.setSpacingBefore(25);
        document.add(table);

        table = createtableRentshouse(tbRentshouses, tbDescriptionstatement.getSumRentshouse());
        table.setSpacingBefore(25);
        document.add(table);

        table = createtableTeachextra(tbTeachextras, tbDescriptionstatement.getSumTeachextra());
        table.setSpacingBefore(25);
        document.add(table);

        table = createtableExpenpaper(tbExpenpapers, tbDescriptionstatement.getSumExpenpaper());
        table.setSpacingBefore(25);
        document.add(table);

        table = createtableComlecturer(tbComlecturers, tbDescriptionstatement.getSumComlecturer());
        table.setSpacingBefore(25);
        document.add(table);

        table = createtableOthercompensation(tbOthercompensations,
                tbDescriptionstatement.getSumOthercompensation());
        table.setSpacingBefore(25);
        document.add(table);

        createHeadlistBudwork(document, "2");

        table = createtableAllowancesrental(tbAllowancesrentals,
                tbDescriptionstatement.getSumAllowancesrental());
        table.setSpacingBefore(25);
        document.add(table);

        table = createtableGasolineDetail(tbGasolineDetails, tbDescriptionstatement.getSumGasoline());
        table.setSpacingBefore(25);
        document.add(table);

        table = createtableRepairofequipment(tbRepairofequipments,
                tbDescriptionstatement.getSumRepairofequipment());
        table.setSpacingBefore(25);
        document.add(table);

        table = createtableWageservice(tbWageservices, tbDescriptionstatement.getSumWageservice());
        table.setSpacingBefore(25);
        document.add(table);

        table = createtableMeetingofthesnack(tbMeetingofthesnacks,
                tbDescriptionstatement.getSumMeetingofthesnack());
        table.setSpacingBefore(25);
        document.add(table);

        table = createtableSocialsecurity(tbSocialsecuritys, tbDescriptionstatement.getSumSocialsecurity());
        table.setSpacingBefore(25);
        document.add(table);

        table = createtableRentalproperty(tbRentalpropertys, tbDescriptionstatement.getSumRentalproperty());
        table.setSpacingBefore(25);
        document.add(table);

        table = createtableThecertificationfood(tbThecertificationfoods,
                tbDescriptionstatement.getSumThecertificationfood());
        table.setSpacingBefore(25);
        document.add(table);

        table = createtableThecertificationdrinks(tbThecertificationdrinks,
                tbDescriptionstatement.getSumThecertificationdrink());
        table.setSpacingBefore(25);
        document.add(table);

        table = createtableThegift(tbThegifts, tbDescriptionstatement.getSumThegift());
        table.setSpacingBefore(25);
        document.add(table);

        table = createtableTax(tbTaxs, tbDescriptionstatement.getSumTax());
        table.setSpacingBefore(25);
        document.add(table);

        table = createtableFee(tbFees, tbDescriptionstatement.getSumFee());
        table.setSpacingBefore(25);
        document.add(table);

        table = createtableInsurance(tbInsurances, tbDescriptionstatement.getSumInsurance());
        table.setSpacingBefore(25);
        document.add(table);

        table = createtableEmploy(tbEmploys, tbDescriptionstatement.getSumEmploy());
        table.setSpacingBefore(25);
        document.add(table);

        createHeadlistBudwork(document, "3");

        table = createtableMaterial1(tbMaterials1, tbDescriptionstatement.getSumMOffice());
        table.setSpacingBefore(25);
        document.add(table);

        table = createtableMaterial2(tbMaterials2, tbDescriptionstatement.getSumMBuild());
        table.setSpacingBefore(25);
        document.add(table);

        table = createtableMaterial3(tbMaterials3, tbDescriptionstatement.getSumMKitchen());
        table.setSpacingBefore(25);
        document.add(table);

        table = createtableMaterial4(tbMaterials4, tbDescriptionstatement.getSumMElectrical());
        table.setSpacingBefore(25);
        document.add(table);

        table = createtableMaterial5(tbMaterials5, tbDescriptionstatement.getSumMMedic());
        table.setSpacingBefore(25);
        document.add(table);

        table = createtableMaterial6(tbMaterials6, tbDescriptionstatement.getSumMStudy());
        table.setSpacingBefore(25);
        document.add(table);

        table = createtableMaterial7(tbMaterials7, tbDescriptionstatement.getSumMBook());
        table.setSpacingBefore(25);
        document.add(table);

        table = createtableMaterial8(tbMaterials8, tbDescriptionstatement.getSumMFarm());
        table.setSpacingBefore(25);
        document.add(table);

        table = createtableMaterial9(tbMaterials9, tbDescriptionstatement.getSumMCom());
        table.setSpacingBefore(25);
        document.add(table);

        table = createtableMaterial10(tbMaterials10, tbDescriptionstatement.getSumMMul());
        table.setSpacingBefore(25);
        document.add(table);

        table = createtableMaterial11(tbMaterials11, tbDescriptionstatement.getSumMOther());
        table.setSpacingBefore(25);
        document.add(table);

        createHeadlistBudwork(document, "4");

        table = createtablePublicutility(tbPublicutilitys, tbDescriptionstatement.getSumPublicutility());
        table.setSpacingBefore(25);
        document.add(table);

        document.close();
    } catch (FileNotFoundException e) {

        e.printStackTrace();
    } catch (DocumentException e) {
        e.printStackTrace();
    }
    return document;
}

From source file:com.planning.project.controller.CreatePDF.java

private static void addTitlePage(Document document) throws DocumentException, IOException {

    Font font = new Font(BaseFont.createFont("D:/THSarabunNew.ttf", BaseFont.IDENTITY_H, BaseFont.EMBEDDED));
    font.setSize(24);

    String imagepath = "src/main/webapp/resources/images/curt.gif";
    Image img = Image.getInstance(imagepath);
    img.scaleToFit(70f, 70f);/*  w ww.j a  va 2 s . c o m*/

    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("MM/dd/yyyy");

    Paragraph created = new Paragraph();
    created.setFont(TIME_ROMAN_SMALL);
    created.add("Report created on " + simpleDateFormat.format(new Date()));
    created.setAlignment(Element.ALIGN_RIGHT);

    Paragraph logo = new Paragraph();
    logo.setFont(TIME_ROMAN_SMALL);
    logo.add(img);
    logo.setAlignment(Element.ALIGN_LEFT);
    document.add(created);
    document.add(logo);

    // Paragraph created = new Paragraph();
    // created.setFont(TIME_ROMAN_SMALL);
    // created.add("Report created on " + simpleDateFormat.format(new
    // Date()));
    // created.setAlignment(Element.ALIGN_RIGHT);

    Paragraph paragraph = new Paragraph();
    paragraph.setFont(font);
    paragraph.add("FormProject ");

    paragraph.setAlignment(Element.ALIGN_CENTER);
    document.add(paragraph);
    creteEmptyLine(created, 1);

}

From source file:com.planning.project.controller.CreatePDF.java

private static void createTable(Document document) throws DocumentException, IOException {
    Font font = new Font(BaseFont.createFont("D:/THSarabunNew.ttf", BaseFont.IDENTITY_H, BaseFont.EMBEDDED));
    font.setSize(16);

    Paragraph paragraph = new Paragraph();
    paragraph.setFont(font);// w  w w.ja v  a  2 s .co  m
    creteEmptyLine(paragraph, 2);
    document.add(paragraph);
    PdfPTable table = new PdfPTable(7);

    paragraph.add("");

    PdfPCell c1 = new PdfPCell(new Phrase("asasas", font));

    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    c1 = new PdfPCell(new Phrase("/?", font));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    c1 = new PdfPCell(new Phrase("?", font));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    TbActivity ac = new TbActivity();

    c1 = new PdfPCell(new Phrase("", font));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    c1 = new PdfPCell(new Phrase("", font));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    c1 = new PdfPCell(new Phrase("", font));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);

    c1 = new PdfPCell(new Phrase("", font));
    c1.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(c1);
    table.setHeaderRows(1);

    paragraph.add("");

    for (int i = 0; i < 7; i++) {
        table.setWidthPercentage(100);
        table.getDefaultCell().setHorizontalAlignment(Element.ALIGN_CENTER);
        table.getDefaultCell().setVerticalAlignment(Element.ALIGN_MIDDLE);
        table.addCell(paragraph);

    }

    document.add(table);
}

From source file:com.planning.project.controller.CreatePDF.java

private static void createPagePDFFormProject(Document document, TbFormProject tbFormProject,
        List<TbActivity> activity, List<TbDetailSka> detailSka, List<TbDetailSm> detailSms,
        TbFormSubproject subProject) throws DocumentException, IOException {

    Font font = new Font(BaseFont.createFont("D:/THSarabunNew.ttf", BaseFont.IDENTITY_H, BaseFont.EMBEDDED));
    font.setSize(16);
    int acNo = 0;

    Paragraph openning = new Paragraph();
    Paragraph ska = new Paragraph();
    Paragraph sms = new Paragraph();
    Paragraph notice = new Paragraph();
    Paragraph address = new Paragraph();
    Paragraph readyTodo = new Paragraph();

    readyTodo.setFont(font);/*w ww  . jav  a  2s  .  c om*/
    address.setFont(font);
    ska.setFont(font);
    sms.setFont(font);
    notice.setFont(font);
    openning.setFont(font);
    openning.add("  : " + tbFormProject.getTbFaculty().getFacultyName());
    creteEmptyLine(openning, 1);
    openning.add("?"
            + tbFormProject.getTbStrBud().getStrBudName());
    creteEmptyLine(openning, 1);
    openning.add("?  : " + tbFormProject.getTbPlan().getPlansName());
    creteEmptyLine(openning, 1);
    openning.add("? : "
            + tbFormProject.getTbStrMin().getStrMinName());
    creteEmptyLine(openning, 1);
    openning.add("? : "
            + tbFormProject.getTbMisUni().getMisUniName());
    creteEmptyLine(openning, 1);
    openning.add(" : "
            + tbFormProject.getTbSubUni().getSubUniName());
    creteEmptyLine(openning, 1);
    openning.add("? : " + tbFormProject.getTbProduct().getProductName());
    creteEmptyLine(openning, 1);
    openning.add(
            "? : " + tbFormProject.getTbProjectname().getProjectnameName());
    creteEmptyLine(openning, 1);
    openning.add("? : "
            + tbFormProject.getTbPerson().getPersonName() + " "
            + tbFormProject.getTbPerson().getPersonLastname());
    creteEmptyLine(openning, 1);
    openning.add("  : " + tbFormProject.getTotal());
    creteEmptyLine(openning, 1);
    openning.add("? : "
            + tbFormProject.getAllocateMoney());
    creteEmptyLine(openning, 1);
    openning.add(" : "
            + (Long.parseLong(tbFormProject.getAllocateMoney())
                    - Long.parseLong(tbFormProject.getMoneyBalance())));
    creteEmptyLine(openning, 1);
    openning.add(" : " + tbFormProject.getMoneyBalance());

    creteLine(openning, 1);
    creteEmptyLine(openning, 1);
    for (TbActivity ac : activity) {
        acNo++;
        openning.add("??" + acNo + ":" + ac.getActivityName()
                + "?? : " + ac.getAddressName());
        creteEmptyLine(openning, 1);
        openning.add("?? : " + ac.getStartdate()
                + "?? : " + ac.getEnddate());
        creteEmptyLine(openning, 1);
        openning.add("? : "
                + ac.getAllocateMoney() + " : "
                + ac.getMoneyBalance());
        creteEmptyLine(openning, 1);
        openning.add(" : "
                + (Long.parseLong(ac.getAllocateMoney()) - Long.parseLong(ac.getMoneyBalance())));

        creteLine(openning, 1);
        creteEmptyLine(openning, 1);
    }
    ska.add("      ?? (?)");
    creteEmptyLine(ska, 1);
    for (TbDetailSka de : detailSka) {
        ska.add(de.getTbSkaType().getSkaTypeName() + "  : "
                + de.getTbSkaIndicatorsFac().getSkaIndicatorsFacName() + "  : "
                + de.getTbSkaIndicatorsHouse().getSkaIndicatorsHouseName());
        creteEmptyLine(ska, 1);
    }
    sms.add("      ??? ()");
    creteEmptyLine(sms, 1);
    for (TbDetailSm sm : detailSms) {
        sms.add(sm.getTbSmsCategory().getSmsCategoryName() + " " + "  "
                + sm.getTbSmsIndicator().getSmsIndicatorsName());
        creteEmptyLine(sms, 1);
    }

    notice.add(
            " : ???????  ?????? ");
    creteEmptyLine(notice, 1);

    address.add("? : " + " : "
            + subProject.getTbAmphur().getAmphurTh() + " : "
            + subProject.getTbProvince().getProvinceTh());
    creteEmptyLine(address, 1);

    readyTodo.add("?");
    creteEmptyLine(readyTodo, 1);
    readyTodo.add("? : "
            + subProject.getTbApproPlaceType().getApproPlaceTypeName());
    creteEmptyLine(readyTodo, 1);
    readyTodo.add("?/ : "
            + subProject.getTbApproPoint1().getApproPointName());
    creteEmptyLine(readyTodo, 1);
    readyTodo.add("/?  : "
            + subProject.getTbApproPoint2().getApproPointName());
    creteEmptyLine(readyTodo, 1);
    readyTodo.add("?? : "
            + subProject.getTbApproProjectType().getApproProjectTypeName());
    creteEmptyLine(readyTodo, 1);

    document.add(openning);
    document.add(ska);
    document.add(sms);
    document.add(notice);
    document.add(address);
    document.add(readyTodo);

}

From source file:com.planning.project.controller.CreatePDF.java

public static PdfPTable createtableTargetGroup(TbTargetgroup targetGroup) throws DocumentException, Exception {

    Font font = new Font(BaseFont.createFont("D:/THSarabunNew.ttf", BaseFont.IDENTITY_H, BaseFont.EMBEDDED));
    font.setSize(16);

    PdfPTable table = new PdfPTable(3);
    table.getDefaultCell().setHorizontalAlignment(Element.ALIGN_CENTER);
    table.getDefaultCell().setVerticalAlignment(Element.ALIGN_MIDDLE);
    PdfPCell cell = new PdfPCell(new Phrase("? ", font));
    cell.setColspan(5);//from w ww  .  j a v a  2  s. c o  m
    table.addCell(cell);

    cell = new PdfPCell(new Phrase("", font));
    cell.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(cell);
    cell = new PdfPCell(new Phrase("?()", font));
    cell.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(cell);
    cell = new PdfPCell(new Phrase(
            " ()", font));
    cell.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(cell);

    table.addCell(new PdfPCell(new Phrase("", font)));
    table.addCell(new PdfPCell(new Phrase(targetGroup.getJooutMana(), font)));
    table.addCell(new PdfPCell(new Phrase(targetGroup.getJoinMana(), font)));

    table.addCell(new PdfPCell(new Phrase("", font)));
    table.addCell(new PdfPCell(new Phrase(targetGroup.getJooutTeach(), font)));
    table.addCell(new PdfPCell(new Phrase(targetGroup.getJoinTeach(), font)));

    table.addCell(new PdfPCell(new Phrase("", font)));
    table.addCell(new PdfPCell(new Phrase(targetGroup.getJooutEmp(), font)));
    table.addCell(new PdfPCell(new Phrase(targetGroup.getJoinEmp(), font)));

    table.addCell(new PdfPCell(new Phrase("??", font)));
    table.addCell(new PdfPCell(new Phrase(targetGroup.getJooutStu(), font)));
    table.addCell(new PdfPCell(new Phrase(targetGroup.getJoinStu(), font)));

    table.addCell(new PdfPCell(new Phrase("/?", font)));
    table.addCell(new PdfPCell(new Phrase(targetGroup.getJooutCommu(), font)));
    table.addCell(new PdfPCell(new Phrase(targetGroup.getJoinCommu(), font)));

    table.addCell(
            new PdfPCell(new Phrase("?/?", font)));
    table.addCell(new PdfPCell(new Phrase(targetGroup.getJooutDisable(), font)));
    table.addCell(new PdfPCell(new Phrase(targetGroup.getJoinDisable(), font)));

    table.addCell(new PdfPCell(new Phrase("", font)));
    table.addCell(new PdfPCell(new Phrase(targetGroup.getJooutOther(), font)));
    table.addCell(new PdfPCell(new Phrase(targetGroup.getJoinOther(), font)));

    return table;
}

From source file:com.planning.project.controller.CreatePDF.java

public static PdfPTable createtableTargetGroup2(TbTargetgroup targetGroup) throws DocumentException, Exception {

    Font font = new Font(BaseFont.createFont("D:/THSarabunNew.ttf", BaseFont.IDENTITY_H, BaseFont.EMBEDDED));
    font.setSize(16);

    PdfPTable table = new PdfPTable(3);
    table.getDefaultCell().setHorizontalAlignment(Element.ALIGN_CENTER);
    table.getDefaultCell().setVerticalAlignment(Element.ALIGN_MIDDLE);
    PdfPCell cell = new PdfPCell(new Phrase("?", font));
    cell.setColspan(5);/*  w w  w .  ja  v a2 s. co m*/
    table.addCell(cell);

    cell = new PdfPCell(new Phrase("", font));
    cell.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(cell);
    cell = new PdfPCell(new Phrase("?()", font));
    cell.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(cell);
    cell = new PdfPCell(new Phrase(
            " ()", font));
    cell.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(cell);

    table.addCell(new PdfPCell(new Phrase("", font)));
    table.addCell(new PdfPCell(new Phrase(targetGroup.getActoutMana(), font)));
    table.addCell(new PdfPCell(new Phrase(targetGroup.getActinMana(), font)));

    table.addCell(new PdfPCell(new Phrase("", font)));
    table.addCell(new PdfPCell(new Phrase(targetGroup.getActoutTeach(), font)));
    table.addCell(new PdfPCell(new Phrase(targetGroup.getActinTeach(), font)));

    table.addCell(new PdfPCell(new Phrase("", font)));
    table.addCell(new PdfPCell(new Phrase(targetGroup.getActoutEmp(), font)));
    table.addCell(new PdfPCell(new Phrase(targetGroup.getActinEmp(), font)));

    table.addCell(new PdfPCell(new Phrase("??", font)));
    table.addCell(new PdfPCell(new Phrase(targetGroup.getActoutStu(), font)));
    table.addCell(new PdfPCell(new Phrase(targetGroup.getJoinStu(), font)));

    table.addCell(new PdfPCell(new Phrase("?", font)));
    table.addCell(new PdfPCell(new Phrase(targetGroup.getActoutLect(), font)));
    table.addCell(new PdfPCell(new Phrase(targetGroup.getActinLect(), font)));

    return table;

}

From source file:com.planning.project.controller.CreatePDF.java

private static void createPagePDFFormProject2(Document document, TbFormProject tbFormProject,
        List<TbActivity> activity, List<TbDetailSka> detailSka, List<TbDetailSm> detailSms,
        TbFormSubproject subProject) throws DocumentException, IOException {

    Font font = new Font(BaseFont.createFont("D:/THSarabunNew.ttf", BaseFont.IDENTITY_H, BaseFont.EMBEDDED));
    font.setSize(16);

    Paragraph openning = new Paragraph();
    openning.setFont(font);//from   ww w  .  ja  va  2  s. co  m

    creteLine(openning, 1);
    openning.add("??? ");
    creteEmptyLine(openning, 1);
    openning.add("????");
    creteEmptyLine(openning, 1);
    openning.add("???  : "
            + subProject.getTbMonth1().getMonthLong());
    creteEmptyLine(openning, 1);
    openning.add(
            "? : " + subProject.getTbMonth2().getMonthLong());
    creteEmptyLine(openning, 1);
    openning.add(
            "??????? : "
                    + subProject.getTbMonth3().getMonthLong());
    creteEmptyLine(openning, 1);
    openning.add("??");
    creteEmptyLine(openning, 1);
    openning.add(
            "? ????  : "
                    + subProject.getTbMonth4().getMonthLong());
    creteEmptyLine(openning, 1);
    openning.add(
            "???   : "
                    + subProject.getTbMonth5().getMonthLong());
    creteEmptyLine(openning, 1);
    openning.add(
            "//?????   : "
                    + subProject.getTbMonth6().getMonthLong());
    creteEmptyLine(openning, 1);
    openning.add(
            "??? : ( 3 ?)    : "
                    + subProject.getWorkflowPlanBudget());
    creteLine(openning, 1);
    creteEmptyLine(openning, 1);
    document.add(openning);
}

From source file:com.planning.project.controller.CreatePDF.java

public static PdfPTable createtableFollowCheck(TbFormSubproject subProject)
        throws DocumentException, Exception {

    Font font = new Font(BaseFont.createFont("D:/THSarabunNew.ttf", BaseFont.IDENTITY_H, BaseFont.EMBEDDED));
    font.setSize(16);

    PdfPTable table = new PdfPTable(3);
    table.getDefaultCell().setHorizontalAlignment(Element.ALIGN_CENTER);
    table.getDefaultCell().setVerticalAlignment(Element.ALIGN_MIDDLE);
    PdfPCell cell = new PdfPCell(new Phrase(
            "?? (C_Check)",
            font));/*  w  w w  .  j a va 2 s .c  o  m*/
    cell.setColspan(3);
    table.addCell(cell);

    cell = new PdfPCell(new Phrase("?", font));
    cell.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(cell);
    cell = new PdfPCell(new Phrase(
            "??",
            font));
    cell.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(cell);
    cell = new PdfPCell(new Phrase("?", font));
    cell.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(cell);

    table.addCell(new PdfPCell(new Phrase(
            "????",
            font)));
    table.addCell(new PdfPCell(new Phrase(subProject.getFollowCCheckTool(), font)));
    table.addCell(new PdfPCell(new Phrase(subProject.getFollowCCheckTime(), font)));

    table.addCell(new PdfPCell(new Phrase(
            "??",
            font)));
    table.addCell(new PdfPCell(new Phrase(subProject.getAssesCCheckTool(), font)));
    table.addCell(new PdfPCell(new Phrase(subProject.getAssesCCheckTime(), font)));

    table.addCell(new PdfPCell(new Phrase(
            "?? /",
            font)));
    table.addCell(new PdfPCell(new Phrase(subProject.getFollowInCCheckTool(), font)));
    table.addCell(new PdfPCell(new Phrase(subProject.getFollowInCCheckTime(), font)));

    return table;

}

From source file:com.planning.project.controller.CreatePDF.java

public static PdfPTable createtablePro(TbFormProject tbFormProject) throws DocumentException, Exception {

    Font font = new Font(BaseFont.createFont("D:/THSarabunNew.ttf", BaseFont.IDENTITY_H, BaseFont.EMBEDDED));
    font.setSize(16);

    PdfPTable table = new PdfPTable(5);
    table.getDefaultCell().setHorizontalAlignment(Element.ALIGN_CENTER);
    table.getDefaultCell().setVerticalAlignment(Element.ALIGN_MIDDLE);
    PdfPCell cell = new PdfPCell(new Phrase(
            "/ :/",
            font));/*from   w  w w.  j a  v a 2s .  co  m*/
    cell.setColspan(5);
    table.addCell(cell);

    cell = new PdfPCell(
            new Phrase("", font));
    cell.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(cell);
    cell = new PdfPCell(new Phrase("", font));
    cell.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(cell);
    cell = new PdfPCell(new Phrase("", font));
    cell.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(cell);
    cell = new PdfPCell(new Phrase("", font));
    cell.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(cell);
    cell = new PdfPCell(new Phrase("", font));
    cell.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(cell);

    table.addCell(new PdfPCell(new Phrase("", font)));
    table.addCell(new PdfPCell(new Phrase(tbFormProject.getProQuantitative(), font)));
    table.addCell(new PdfPCell(new Phrase(tbFormProject.getProQualitative(), font)));
    table.addCell(new PdfPCell(new Phrase(tbFormProject.getProTiming(), font)));
    table.addCell(new PdfPCell(new Phrase(tbFormProject.getProCost(), font)));
    table.addCell(new PdfPCell(new Phrase("", font)));
    table.addCell(new PdfPCell(new Phrase(tbFormProject.getAnsQuantitative(), font)));
    table.addCell(new PdfPCell(new Phrase(tbFormProject.getAnsQualtitative(), font)));
    table.addCell(new PdfPCell(new Phrase(tbFormProject.getAnsTiming(), font)));
    table.addCell(new PdfPCell(new Phrase(tbFormProject.getAnsCost(), font)));

    return table;

}

From source file:com.planning.project.controller.CreatePDF.java

private static void createPagePDFFormProject3(Document document, TbFormProject tbFormProject,
        List<TbActivity> activity, List<TbDetailSka> detailSka, List<TbDetailSm> detailSms,
        TbFormSubproject subProject) throws DocumentException, IOException {

    Font font = new Font(BaseFont.createFont("D:/THSarabunNew.ttf", BaseFont.IDENTITY_H, BaseFont.EMBEDDED));
    font.setSize(16);

    Paragraph openning = new Paragraph();
    openning.setFont(font);/*from  ww  w  . j  a  v  a2s. c o m*/

    creteLine(openning, 1);
    creteEmptyLine(openning, 1);
    openning.add(
            "(?????)");
    creteEmptyLine(openning, 1);
    openning.add(": " + tbFormProject.getResults());
    creteEmptyLine(openning, 1);
    openning.add(
            "?/ ? ()");
    creteEmptyLine(openning, 1);
    openning.add(": " + tbFormProject.getProblem());
    creteEmptyLine(openning, 1);
    openning.add(
            "??/? ()");
    creteEmptyLine(openning, 1);
    openning.add(": " + tbFormProject.getDevelopmentPlan());
    creteEmptyLine(openning, 1);

    openning.add(
            "???");
    creteEmptyLine(openning, 1);
    document.add(openning);

    openning.add(
            "?? (???? ? ? ??? ??  ?)");
    creteEmptyLine(openning, 1);
    openning.add(": " + tbFormProject.getRiskPolitics());
    creteEmptyLine(openning, 1);
    openning.add(
            "????/?");
    creteEmptyLine(openning, 1);
    openning.add(": " + tbFormProject.getRiskDefPolitics());
    creteLine(openning, 1);
    creteEmptyLine(openning, 1);

    openning.add(
            "??/? (??? ?/? /?? ?? ?)");
    creteEmptyLine(openning, 1);
    openning.add(": " + tbFormProject.getRiskPolicy());
    creteEmptyLine(openning, 1);
    openning.add(
            "????/?");
    creteEmptyLine(openning, 1);
    openning.add(": " + tbFormProject.getRiskDefPolicy());
    creteLine(openning, 1);
    creteEmptyLine(openning, 1);

    openning.add(
            "??? (? ??? ? ? ??)");
    creteEmptyLine(openning, 1);
    openning.add(": " + tbFormProject.getRiskWorkflow());
    creteEmptyLine(openning, 1);
    openning.add(
            "????/?");
    creteEmptyLine(openning, 1);
    openning.add(": " + tbFormProject.getRiskDefWorkflow());
    creteLine(openning, 1);
    creteEmptyLine(openning, 1);

    openning.add(
            "???? (? ?? ?????)");
    creteEmptyLine(openning, 1);
    openning.add(": " + tbFormProject.getRiskFinance());
    creteEmptyLine(openning, 1);
    openning.add(
            "????/?");
    creteEmptyLine(openning, 1);
    openning.add(": " + tbFormProject.getRiskDefFinance());
    creteLine(openning, 1);
    creteEmptyLine(openning, 1);

    openning.add(
            " (?   ???)");
    creteEmptyLine(openning, 1);
    openning.add(": " + tbFormProject.getRiskTechnology());
    creteEmptyLine(openning, 1);
    openning.add(
            "????/?");
    creteEmptyLine(openning, 1);
    openning.add(": " + tbFormProject.getRiskDefTechnology());
    creteLine(openning, 1);
    creteEmptyLine(openning, 1);

    openning.add(
            "? (?????    ?)");
    creteEmptyLine(openning, 1);
    openning.add(": " + tbFormProject.getRiskEnvironment());
    creteEmptyLine(openning, 1);
    openning.add(
            "????/?");
    creteEmptyLine(openning, 1);
    openning.add(": " + tbFormProject.getRiskDefEnvironment());
    creteLine(openning, 1);
    creteEmptyLine(openning, 1);
    document.add(openning);
}