Salut je crée un PDF avec iText (un Devis) et je souhaite avoir 2 colonnes afin de mettre les coordonées du fournisseur et du client l'une en face de l'autre,
Voici mon code :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
            com.itextpdf.text.Document documentPDF=new com.itextpdf.text.Document(PageSize.A4, 20, 20, 20, 20);
            PdfWriter.getInstance(documentPDF, new FileOutputStream(fichierTemp));
            documentPDF.open();
            MultiColumnText mct = new MultiColumnText();
            mct.addRegularColumns(documentPDF.left(), documentPDF.right(), 10f, 2);
            documentPDF.addTitle(this.titre);
            Paragraph paraTitre=new Paragraph();
            paraTitre.add(new Paragraph(this.titre));
            documentPDF.add(paraTitre);
            documentPDF.add(new Paragraph(" "));
            Paragraph paraGauche=new Paragraph();
            paraGauche.add(new Paragraph(this.nomFournisseur));
            paraGauche.add(new Paragraph(this.emailFournisseur));
            paraGauche.add(new Paragraph(this.telephoneFournisseur));
            paraGauche.add(new Paragraph(this.faxFournisseur));
            paraGauche.add(new Paragraph(" "));
            paraGauche.add(new Paragraph(this.nomEntrepriseFournisseur));
            paraGauche.add(new Paragraph(this.adresseFournisseur));
            paraGauche.add(new Paragraph(this.codePostalFournisseur));
            paraGauche.add(new Paragraph(this.villeFournisseur));
            paraGauche.add(new Paragraph(" "));
            paraGauche.add(new Paragraph(this.siretFournisseur));
            mct.addElement(paraGauche);
            //documentPDF.add(mct);
            //documentPDF.newPage();
            Paragraph paraDroite=new Paragraph();
            paraDroite.add(new Paragraph(this.nomClient));
            paraDroite.add(new Paragraph(this.emailClient));
            paraDroite.add(new Paragraph(this.telephoneClient));
            paraDroite.add(new Paragraph(this.faxClient));
            paraDroite.add(new Paragraph(" "));
            paraDroite.add(new Paragraph(this.nomEntrepriseClient));
            paraDroite.add(new Paragraph(this.adresseClient));
            paraDroite.add(new Paragraph(this.codePostalClient));
            paraDroite.add(new Paragraph(this.villeClient));
            paraDroite.add(new Paragraph(" "));
            paraDroite.add(new Paragraph(this.siretClient));
            mct.addElement(paraDroite);
            documentPDF.add(mct);
            documentPDF.close();
Les colonnes s'affichent bien, mais l'une en dessous de l'autre, vu le peu d'infos qu'il y a sur le net (j'ai cherché longtemps) je préfère vous demander de l'aide.
Merci !