The moveTo is to signal that there is content and a page should be printed.
I'll change it to a single space.
Best Regards,
Paulo Soares
> -----Original Message-----
> From: Finn Bock [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, January 21, 2003 14:33
> To: [EMAIL PROTECTED]
> Subject: [iText-questions] moveTo() when adding fields.
>
> Hi,
>
> While using iText to create interactive forms, I noticed that adding the
> various fieldtype to a page will also insert a "moveTo(0, 0)" in the
> page stream.
>
> Normally that isn't noticeable unless the page stream is in text mode as
> shown in the example below. I uses a checkbox in the example, but all
> the field type add a "moveTo(0, 0)".
>
> The workaround is obvious: just don't do that; but does the "moveTo(0,
> 0)" serve any purpose at all?
>
> regards,
> finn
>
>
> import java.io.*;
> import com.lowagie.text.*;
> import com.lowagie.text.pdf.*;
>
> public class tst01 {
> public static void main(String[] args) throws Exception {
> Document doc = new Document();
> PdfWriter writer = PdfWriter.getInstance(doc,
> new FileOutputStream("tst01.pdf"));
>
> PdfAcroForm acroForm = writer.getAcroForm();
> doc.open();
> doc.add(new Paragraph("Hello World"));
> PdfContentByte cb = writer.getDirectContent();
> cb.beginText();
> acroForm.addCheckBox("CB1", "Food", true, 180, 685, 190, 695);
> cb.endText();
> doc.close();
> }
> } << File: tst01.pdf >>
-------------------------------------------------------
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions