Hi,

I produce some images as .png files which I use in web pages. The web app
needs to produce PDF files too, using the same images.

I put the images into PdfPCells, and it sort of worked OK, but the images
look a little fuzzy ( they are perfectly clear in a web page ).

I figured it might look better if I drew the images directly into the pdf.

2 questions:

1. Why do the images look fuzzy in the pdf file ( just a bit, but I have had
complaints...)

2. I want to draw the images in a PdfPCell. I need to get hold of a
PdfContentByte? Something like this:

        PdfPCell aspectTableCell = new PdfPCell();
        ColumnText cellCT = aspectTableCell.getColumn();
        PdfContentByte cellPCB = cellCT.getCanvas();
        PdfTemplate tp = cellPCB.createTemplate(width, height);
        DefaultFontMapper mapper = new DefaultFontMapper();
        mapper.insertDirectory("C:\\1\\AstroScript");
        Graphics2D g2 = tp.createGraphics(width, height, mapper);

but cellCT.getCanvas() returns null.

How can I get hold of a PdfContentByte for a PdfPCell?

Thanks,

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