Okay, so table.setWidthPercentage(100). Works perfectly for horizontal.
I can print left edge to right edge of the paper. How can I do the same
thing for Vertical? I want to also print from the top edge of the
paper to the bottom edge. I imagine I would turn the header and footer
off. How would I do that?
Thanks,
Craig
> -----Original Message-----
> From: Craig Newlander
>
> I'm working on a stock option theoretical numbers program and I
> need to print out a somewhat complex table structure. I
> would like to
> print out in landscape and with zero margins. So I set the document
> using:
>
> Document pdfDoc = new Document( PageSize.LEGAL.rotate(), 0, 0, 0, 0
> );
>
> I then use a combination of PdfPtable and PdfPcell to create my table
> structure. When I go to view the pdf file I create I still have
> margins and when I print it out it look like the text in only letter
> landscape.
>
>
> My questions are:
>
> 1) I would like legal landscape and print without borders. I need to
> utilize as much of the paper as possible.
You need table.setWidthPercentage(100).
>
> 2) How would I use a Arial Font?
BaseFont bf = BaseFont.createFont("c:\\windows\\fonts\\arial.ttf",
BaseFont.WINANSI, true);
Font f = new Font(bf, 12);
>
> 3) How would I control the spacing between the cells? I would like to
> tighten it up a bit.
You cannot tighten it more than the size of the font. For better result
use:
setPadding(0);
setPaddingTop(-1);
setPaddingBottom(1);
Best Regards,
Paulo Soares
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions