Hello, I currently play arounf a bit with Chapter and Section to see if it
fits my needs.
I would like to set an indentation for the sections but I get weird
behaviour. The titles move over the left border if a section spans more
than one page. I saw a similar behaviour described for paragraphs a few
years ago.
Here is a bit of my testing code:
...
Paragraph jobTitle = new Paragraph("Jobtitel so und so - J7345");
Chapter job = new Chapter(jobTitle, 1);
job.setNumberDepth(0);
Paragraph masterdataTitle = new Paragraph("Stammdaten");
Section masterdata = job.addSection(masterdataTitle);
masterdata.setIndentationLeft(40);
for (int i = 0; i < 40; i++) {
Paragraph para = new Paragraph("Name: This is masterdata row
nummber " + i);
masterdata.add(para);
}
Paragraph milestonesTitle = new Paragraph("Meilensteine");
Section milestones = job.addSection(milestonesTitle);
PdfPTable table = new PdfPTable(2);
for (int i = 0; i < 20; i++) {
PdfPCell cellName = new PdfPCell(new Paragraph("Name: "));
table.addCell(cellName);
Paragraph para = new Paragraph("Name: This is milestone row
nummber " + i);
PdfPCell paraCell = new PdfPCell(para);
table.addCell(paraCell);
}
milestones.add(table);
document.add(job);
...
Best regards
Karola Schaeuble
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions