Hello Paulo,
it follows an example from within a cell. May that be the problem?
public ByteArrayOutputStream getPDF() {
PdfWriter writer = null;
ByteArrayOutputStream baos = new ByteArrayOutputStream();
Document bstgt = new Document(PageSize.A4,68,68,159,68);
try {
writer = PdfWriter.getInstance(bstgt, baos);
bstgt.open();
bstgt.setMargins(68,68,68,68);
PdfPTable table = new PdfPTable();
table.setSplitRows(false);
table.setWidthPercentage(100f);
table.setSpacingAfter(0);
table.setSpacingBefore(0);
PdfPCell cell = new PdfPCell();
cell.addElement(makeParagraph("Der Sicherheitsrat kommt zu einer
Dringlichkeitssitzung zusammen, die Nato-Botschafter tagen, weltweit wird eine
entschlossene Reaktion auf Nordkoreas Atomtest gefordert. Experten rätseln über
die Sprengkraft der Bombe - russische Schätzungen zufolge könnte die Explosion
so stark gewesen sein wie 1945 über Hiroshima.");
disableBorders(cell);
table.add(cell);
bstgt.add(table.getTable());
} catch (DocumentException ex) {
return null;
} finally {
bstgt.close();
if (writer != null)
writer.close();
}
return baos;
}
protected Paragraph makeParagraph(String s) {
Paragraph par = new Paragraph(20, s, FontFactory.HELVETICA);
par.setAlignment(Element.ALIGN_LEFT);
return par;
}
-------- Original-Nachricht --------
Datum: Mon, 09 Oct 2006 06:40:51 -0700
Von: [EMAIL PROTECTED]
An: [email protected]
Betreff: iText-questions Digest, Vol 5, Issue 30
> Message: 4
> Date: Mon, 9 Oct 2006 14:21:40 +0100
> From: "Paulo Soares" <[EMAIL PROTECTED]>
> Subject: Re: [iText-questions] Leading bug
> To: "Post all your questions about iText here"
> <[email protected]>
> Message-ID:
> <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset="utf-8"
>
> That can happen with Phrase but not with Paragraph assuming that we're
> dealing with document.add(). Please post a small complete example so that the
> problem can be reproduced.
>
> Paulo
>
--
GMX DSL-Flatrate 0,- Euro* - Überall, wo DSL verfügbar ist!
NEU: Jetzt bis zu 16.000 kBit/s! http://www.gmx.net/de/go/dsl
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions