Anton, I just figured out that both width and height are correct for me
if I use only the setWidthPercentage() method and not the
setTotalWidth() method.
The problem that keeps me bothering is that the following code doesn't
work. writer.fitsPage(table) seems somehow to trigger a newPage() event,
although I couldn't find any hint in the source of fitsPage(table).
If anybody knows how to prevent that a new page is created please let me
know.
PdfPTable table = new PdfPTable(1);
do {
//add a row...
} while (writer.fitsPage(table));
table.deleteLastRow(); // delete the row which doesn't fit on the page
anymore
document.add(table); // the table is being added wrongly not on the
current page, but on the following page
> -----Ursprüngliche Nachricht-----
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Im
> Auftrag von Anton Ermak
> Gesendet: Montag, 25. August 2003 04:20
> An: Paulo Soares
> Cc: iText-questions
> Betreff: Re: [iText-questions] Porblem with fitsPage / getTableBottom
>
>
> Hello Paulo,
> Thank you for your reply.
> I try extra margin, but without any effect. There is strange
> behavior with
> fitsPage() method: On some documents it work well, but some
> generate table with height 40%-50% of page. I've search
> mailing list and found number reports with simular problem,
> but no solution. Also, I try to set table width with
> precentage and absolute values but nothing happened. I use
> Table, not PdfPTable. Maybe I need migrate to PdfPTable?
>
> Best regards,
> Anton Ermak
>
> ----- Original Message -----
> From: "Paulo Soares" <[EMAIL PROTECTED]>
> To: "Anton Ermak" <[EMAIL PROTECTED]>;
> "iText-questions" <[EMAIL PROTECTED]>
> Sent: Friday, August 22, 2003 8:14 PM
> Subject: Re: [iText-questions] Porblem with fitsPage / getTableBottom
>
>
> > Call fitsPage with an extra margin, just in case. 20 is a
> good number.
> >
> > Best Regards,
> > Paulo Soares
> >
> > ----- Original Message -----
> > From: "Anton Ermak" <[EMAIL PROTECTED]>
> > To: "iText-questions" <[EMAIL PROTECTED]>
> > Sent: Friday, August 22, 2003 9:11
> > Subject: [iText-questions] Porblem with fitsPage / getTableBottom
> >
> >
> > Hello,
> > I've note that table height different before and after calling of
> > Document::add() method. This caused invalid document paging in my
> > program. Does anyone have same problem? Please point me to
> workaround
> > or fix it.
> >
> > сode i use:
> >
> > generateRow(mdl);
> > if( !writer.fitsPage( table ) )
> > {
> > table.deleteLastRow();
> > System.out.println("[Pdf Generator] Table Bottom Before :" +
> > writer.getTableBottom( table ) );
> > document.add( table );
> > System.out.println("[Pdf Generator] Table Bottom After :" +
> > writer.getTableBottom( table ) );
> > document.newPage();
> > makeTable( mdl );
> > generateRow(mdl);
> > }
> >
> >
> >
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: VM Ware
> > With VMware you can run multiple operating systems on a single
> > machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual
> > machines at the same time. Free trial click
> here:http://www.vmware.com/wl/offer/358/0
> > _______________________________________________
> > iText-questions mailing list [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/itext-questions
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: VM Ware
> With VMware you can run multiple operating systems on a
> single machine. WITHOUT REBOOTING! Mix Linux / Windows /
> Novell virtual machines at the same time. Free trial click
> here:http://www.vmware.com/wl/offer/358/0
> _______________________________________________
> iText-questions mailing list [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions