Hello Isabelle!
Unfortunately this doesn't work too. But thanks for this tip. I tried this:
document.add(new Chunk("test123"));
document.newPage();
document.add(new Chunk("test124"));
...and I couldn't find "test123" or "test124" in the resulting PDF document. It seems to me that the PdfCopy-Writer works different to the PdfWriter.
Can somebody of the developers help me?
Sascha
| Isabelle Guimiot <[EMAIL PROTECTED]>
Gesendet von: [EMAIL PROTECTED] 04.12.2003 11:42
|
|
Hi !
you wrote :
document.add(new Chunk(" "));
document.newPage();
You have to add the empty chunk AFTER calling
newPage(), not before...
Isabelle
From: Sascha Schmidt <[EMAIL PROTECTED]>
Date: Thu, 4 Dec 2003 11:04:44 +0100
Dies ist eine mehrteilige Nachricht im MIME-Format.
------=_NextPartTM-000-0011a2c9-20b0-11d8-90e3-0050043ad580
Content-Type: multipart/alternative;
boundary="=_alternative 00373E27C1256DF2_="
--=_alternative 00373E27C1256DF2_=
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello again!
Forget my last mail, it was non-sense. But I'm still
unable to insert
an=20
empty page after an imported document. I've debugged a
little bit
but=20
cannot find the reason.
Has somebody else an idea? This is my new snippet:
private void append(PdfReader reader) throws
BadPdfFormatException,
IOException, DocumentException {
reader.consolidateNamedDestinations();
if (document =3D=3D null) {
document =3D new
Document(reader.getPageSizeWithRotation(1));
writer =3D new MyPdfCopy(document, out);
document.open();
}
final int n =3D reader.getNumberOfPages();
for (int i =3D 0; i < n; )
writer.addPage(writer.getImportedPage(reader,
++i));
=20
if (reader.getAcroForm() !=3D null)
writer.copyAcroForm(reader);
//if (forceEvenPageCount && (n%2 =3D=3D1) ){
document.add(new Chunk(" "));
document.newPage();
//}
}
Thanks a lot guys.
Sascha
____________________________________________________________________________________
Do You Yahoo!? -- Avec Yahoo! soyez au coeur de la r�colte de dons pour le T�l�thon.
http://fr.promotions.yahoo.com/caritatif/
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions
