On 21/01/2008, Bruno Lowagie <[EMAIL PROTECTED]> wrote:
>
> John Pedersen wrote:
> > 1. Why do the images look fuzzy in the pdf file ( just a bit, but I
> > have had complaints...)
> iText doesn't change the number of pixels in the images,
> so the images are OK. Maybe you added the images to a cell
> that scaled the images (thus changing the resolution).
>

Thanks for the quick response. You are right - the images are displayed a
little larger in the pdf file than in the html. As to why they are shown too
big, I can't see though....

        ColumnText ct = new ColumnText(cb);
        ct.setSimpleColumn(36, 36, PageSize.A4.getWidth() - 36, PageSize.A4
                .getHeight() - 36, 18, Element.ALIGN_CENTER);

            PdfPTable table = new PdfPTable(2);
            table.addCell(createImageCell(wheel, 5, 2));
            table.addCell(createImageCell(planetTable, 15, 1));
            table.addCell(createImageCell(aspectTable, 15, 1));

         ct.addElement(table);
         ct.go();

...
private static PdfPCell createImageCell(Image image, int padding,
            int columnSpan) {
        PdfPCell cell = new PdfPCell(image, false);
        // cell.setBorder(PdfPCell.NO_BORDER);
        cell.setColspan(columnSpan);
        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
        cell.setVerticalAlignment(Element.ALIGN_CENTER);
    //    cell.setPadding(padding);
        return cell;
    }
...

regards,

John
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to