Example usage for com.itextpdf.text List ALPHABETICAL

List of usage examples for com.itextpdf.text List ALPHABETICAL

Introduction

In this page you can find the example usage for com.itextpdf.text List ALPHABETICAL.

Prototype

boolean ALPHABETICAL

To view the source code for com.itextpdf.text List ALPHABETICAL.

Click Source Link

Document

a possible value for the lettered parameter

Usage

From source file:src.GUI.PDFGEN.java

License:Open Source License

public void PDFAB(String Headline, int AmountExer, GUISETTINGSPDF k) {
    Document Doc = new Document();
    Rectangle Rec = new Rectangle(PageSize.A4);
    Doc.setPageSize(Rec);//from www  .j av a 2 s. c  om
    try {
        F = File.createTempFile("Blatt", ".pdf");
        PdfWriter.getInstance(Doc, new FileOutputStream(F));
        Doc.open();
        Paragraph Para = new Paragraph(Headline, FONTS.FontHeader());
        Para.setAlignment(Element.ALIGN_CENTER);
        Doc.add(Para);
        First = new MEMORY();
        Current = First;
        GUISETTINGSPDF D = k;
        //Image Img = Image.getInstance("Logo");
        //Doc.add(Img);
        for (int i = 1; i <= AmountExer; i++) {
            List = new List(List.ORDERED, List.ALPHABETICAL);
            for (int c = 0; c < k.taskNumber; c++) {
                TERM Term = new TERM(k.aoAddition, k.aoSubtraction, k.aoMultiplication, k.aoDivision,
                        k.bracketDepht, k.Substitutions, k.Digits, k.decimalPlaces, k.justPositive);
                Current.writeExercise(Term.infix() + "=");
                Current.writeSolution(Double.parseDouble(Term.getSolution()));
                List.add(new ListItem(Current.readExercise()));
                Current.Next = new MEMORY();
                Current = Current.Next;
            }
            Doc.add(new Paragraph(" \n Aufgabe " + i, FONTS.Font()));
            k = k.next;
            Doc.add(List);
        }
        Doc.close();
        Desktop.getDesktop().open(F);
        PDFLB(AmountExer, D);
        Desktop.getDesktop().open(G);
    } catch (Exception e) {
        e.printStackTrace();
    }
}

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 www . ja v  a2s .com*/
    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();
    }
}