Search in sources :

Example 21 with Paragraph

use of com.itextpdf.text.Paragraph in project trainning by fernandotomasio.

the class DOC002PDF method buildComplementacaoInstrucao.

private Chapter buildComplementacaoInstrucao(CurriculoMinimoDTO curriculo) throws DocumentException {
    Chapter ch = new Chapter(new Paragraph("COMPLEMENTAÇÃO DA INSTRUÇÃO", fontManager.getBoldFont()), 3);
    ch.add(Chunk.NEWLINE);
    PdfPTable tableComplementacaoInstrucao = buildComplamentacaoInstrucaoTable(curriculo);
    ch.add(tableComplementacaoInstrucao);
    ch.add(Chunk.NEWLINE);
    PdfPTable tableFlexibilidade = buildFlexibilidadeTable(curriculo);
    ch.add(tableFlexibilidade);
    return ch;
}
Also used : PdfPTable(com.itextpdf.text.pdf.PdfPTable) Chapter(com.itextpdf.text.Chapter) Paragraph(com.itextpdf.text.Paragraph)

Example 22 with Paragraph

use of com.itextpdf.text.Paragraph in project trainning by fernandotomasio.

the class DOC002PDF method buildTableRecomendacoesMetodologicas.

private PdfPTable buildTableRecomendacoesMetodologicas(DisciplinaDTO disciplina) {
    PdfPTable table = new PdfPTable(1);
    table.setWidthPercentage(100);
    PdfPCell cellHeader;
    cellHeader = new PdfPCell(new Phrase("RECOMENDACÕES METODOLÓGICAS", fontManager.getBoldFont()));
    cellHeader.setPadding(10);
    table.addCell(cellHeader);
    PdfPCell cellContent;
    cellContent = new PdfPCell();
    RecomendacaoMetodologicaDTO[] recomendacoes = teachingDocumentsService.findAllRecomendacoesMetodologicasByDisciplina(disciplina.getId());
    for (RecomendacaoMetodologicaDTO recomendacao : recomendacoes) {
        Paragraph referenciaParagraph = new Paragraph(recomendacao.getTexto(), fontManager.getDefaultFont());
        cellContent.addElement(referenciaParagraph);
    }
    cellContent.setPadding(10);
    table.addCell(cellContent);
    return table;
}
Also used : PdfPCell(com.itextpdf.text.pdf.PdfPCell) PdfPTable(com.itextpdf.text.pdf.PdfPTable) RecomendacaoMetodologicaDTO(com.tomasio.projects.trainning.dto.RecomendacaoMetodologicaDTO) Phrase(com.itextpdf.text.Phrase) Paragraph(com.itextpdf.text.Paragraph)

Example 23 with Paragraph

use of com.itextpdf.text.Paragraph in project trainning by fernandotomasio.

the class DOC002PDF method buildDisposicoesFinais.

private Chapter buildDisposicoesFinais(CurriculoMinimoDTO curriculo) {
    Chapter ch = new Chapter(new Paragraph("DISPOSIÇÕES FINAIS", fontManager.getBoldFont()), 8);
    ch.add(Chunk.NEWLINE);
    IReportUtil.fillChapter(ch, curriculo.getDisposicoesFinais2());
    return ch;
}
Also used : Chapter(com.itextpdf.text.Chapter) Paragraph(com.itextpdf.text.Paragraph)

Example 24 with Paragraph

use of com.itextpdf.text.Paragraph in project trainning by fernandotomasio.

the class DOC002PDF method buildSumario.

private Chapter buildSumario(ArrayList<Paragraph> titles) throws DocumentException {
    Paragraph p = new Paragraph("SUMÁRIO", fontManager.getBoldFont());
    p.setAlignment(Element.ALIGN_CENTER);
    Chapter ch = new Chapter(p, 0);
    ch.setNumberDepth(0);
    ch.add(Chunk.NEWLINE);
    for (Paragraph title : titles) {
        ch.add(title);
    }
    return ch;
}
Also used : Chapter(com.itextpdf.text.Chapter) Paragraph(com.itextpdf.text.Paragraph)

Example 25 with Paragraph

use of com.itextpdf.text.Paragraph in project trainning by fernandotomasio.

the class DOC002PDF method buildAbreviaturas.

private Chapter buildAbreviaturas(CurriculoMinimoDTO curriculo) {
    Paragraph p = new Paragraph("LISTA DE ABREVIATURAS", fontManager.getBoldFont());
    p.setAlignment(Element.ALIGN_CENTER);
    Chapter ch = new Chapter(p, 0);
    ch.setNumberDepth(0);
    ch.add(Chunk.NEWLINE);
    AbreviaturaDTO[] abreviaturas = teachingDocumentsService.findAllAbreviaturasByPUD(curriculo.getId());
    for (AbreviaturaDTO abreviatura : abreviaturas) {
        String item = abreviatura.getSigla() + " - " + abreviatura.getDescricao();
        Paragraph itemParagraph = new Paragraph(item, fontManager.getDefaultFont());
        itemParagraph.setAlignment(Element.ALIGN_LEFT);
        ch.add(itemParagraph);
    }
    return ch;
}
Also used : Chapter(com.itextpdf.text.Chapter) AbreviaturaDTO(com.tomasio.projects.trainning.dto.AbreviaturaDTO) Paragraph(com.itextpdf.text.Paragraph)

Aggregations

Paragraph (com.itextpdf.text.Paragraph)67 Chapter (com.itextpdf.text.Chapter)25 PdfPTable (com.itextpdf.text.pdf.PdfPTable)18 Phrase (com.itextpdf.text.Phrase)14 PdfPCell (com.itextpdf.text.pdf.PdfPCell)13 Font (com.itextpdf.text.Font)11 IOException (java.io.IOException)11 DocumentException (com.itextpdf.text.DocumentException)10 Section (com.itextpdf.text.Section)10 Document (com.itextpdf.text.Document)8 ArrayList (java.util.ArrayList)8 ListItem (com.itextpdf.text.ListItem)7 BaseFont (com.itextpdf.text.pdf.BaseFont)7 FileOutputStream (java.io.FileOutputStream)7 List (com.itextpdf.text.List)6 Chunk (com.itextpdf.text.Chunk)5 Image (com.itextpdf.text.Image)5 PdfWriter (com.itextpdf.text.pdf.PdfWriter)5 ObjetivoDisciplinaDTO (com.tomasio.projects.trainning.dto.ObjetivoDisciplinaDTO)5 SubunidadeDidaticaDTO (com.tomasio.projects.trainning.dto.SubunidadeDidaticaDTO)5