List of usage examples for com.itextpdf.text List List
public List(final boolean numbered, final float symbolIndent)
List
. From source file:src.GUI.PDFGEN.java
License:Open Source License
private void PDFLB(int AmountExer, GUISETTINGSPDF k) { Document Doc = new Document(); Rectangle Rec = new Rectangle(PageSize.A4); Doc.setPageSize(Rec);//from w ww .java 2 s .c o m try { G = File.createTempFile("Blatt", ".pdf"); PdfWriter.getInstance(Doc, new FileOutputStream(G)); Doc.open(); Paragraph Para = new Paragraph("Lsungsblatt", FONTS.FontHeader()); Para.setAlignment(Element.ALIGN_CENTER); Doc.add(Para); for (int i = 1; i <= AmountExer; i++) { List = new List(List.ORDERED, List.ALPHABETICAL); for (int c = 0; c < k.taskNumber; c++) { String S = First.readExercise() + First.readSolution(); List.add(new ListItem(S)); First = First.Next; } Doc.add(new Paragraph(" \n Aufgabe" + i, FONTS.Font())); Doc.add(List); k = k.next; } Doc.close(); } catch (Exception e) { e.printStackTrace(); } }