/ Math.pow(10.0, 2);
timeRefPercent = Math.round(((timeRefPercent / timeTT) * 100)
* Math.pow(10.0, 2))
/ Math.pow(10.0, 2);
PdfPTable table = new PdfPTable(4);
PdfPCell c1 = new PdfPCell(new Phrase(
"Temps total effectué (72h)", FontFactory.getFont(
FontFactory.TIMES_ROMAN, 15,
com.itextpdf.text.Font.BOLD)));
c1.setHorizontalAlignment(Element.ALIGN_CENTER);
c1.setPaddingBottom(7);
table.addCell(c1);
c1 = new PdfPCell(new Phrase("Temps total validé",
FontFactory.getFont(FontFactory.TIMES_ROMAN, 15,
com.itextpdf.text.Font.BOLD)));
c1.setHorizontalAlignment(Element.ALIGN_CENTER);
c1.setPaddingBottom(7);
table.addCell(c1);
c1 = new PdfPCell(new Phrase("Temps total en attente",
FontFactory.getFont(FontFactory.TIMES_ROMAN, 15,
com.itextpdf.text.Font.BOLD)));
c1.setHorizontalAlignment(Element.ALIGN_CENTER);
c1.setPaddingBottom(7);
table.addCell(c1);
c1 = new PdfPCell(new Phrase("Temps total refusé",
FontFactory.getFont(FontFactory.TIMES_ROMAN, 15,
com.itextpdf.text.Font.BOLD)));
c1.setHorizontalAlignment(Element.ALIGN_CENTER);
c1.setPaddingBottom(7);
table.addCell(c1);
table.setHeaderRows(1);
c1 = new PdfPCell(new Phrase((timeTT / 60 - (timeTT % 60 / 60))
+ "h " + (timeTT % 60) + "min"));
c1.setHorizontalAlignment(Element.ALIGN_CENTER);
c1.setPaddingBottom(4);
table.addCell(c1);
c1 = new PdfPCell(new Phrase(
(timeVal / 60 - (timeVal % 60 / 60)) + "h "
+ (timeVal % 60) + "min"));
c1.setHorizontalAlignment(Element.ALIGN_CENTER);
c1.setPaddingBottom(4);
table.addCell(c1);
c1 = new PdfPCell(new Phrase(
(timeAtt / 60 - (timeAtt % 60 / 60)) + "h "
+ (timeAtt % 60) + "min"));
c1.setHorizontalAlignment(Element.ALIGN_CENTER);
c1.setPaddingBottom(4);
table.addCell(c1);
c1 = new PdfPCell(new Phrase(
(timeRef / 60 - (timeRef % 60 / 60)) + "h "
+ (timeRef % 60) + "min"));
c1.setHorizontalAlignment(Element.ALIGN_CENTER);
c1.setPaddingBottom(4);
table.addCell(c1);
c1 = new PdfPCell(new Phrase(timeTTpercent + "%"));
c1.setHorizontalAlignment(Element.ALIGN_CENTER);
c1.setPaddingBottom(4);
table.addCell(c1);
c1 = new PdfPCell(new Phrase(timeValPercent + "%"));
c1.setHorizontalAlignment(Element.ALIGN_CENTER);
c1.setPaddingBottom(4);
table.addCell(c1);
c1 = new PdfPCell(new Phrase(timeAttPercent + "%"));
c1.setHorizontalAlignment(Element.ALIGN_CENTER);
c1.setPaddingBottom(4);
table.addCell(c1);
c1 = new PdfPCell(new Phrase(timeRefPercent + "%"));
c1.setHorizontalAlignment(Element.ALIGN_CENTER);
c1.setPaddingBottom(4);
table.addCell(c1);
document.add(table);
} catch (DocumentException de) {
de.printStackTrace();