Paulo Soares wrote:
You have the tranformation:
0.99985 -0.01745 0.01745 0.99985 100 300 cm
before the images.
Thanks for checking that.. But: Where?
Code that created the pdf below..
public static void main(String[] args)
{
Document document = new Document(PageSize.A4, 36, 36, 36, 36);
try
{
// step2
PdfWriter writer = PdfWriter.getInstance(document, new
FileOutputStream("CellWidths.pdf"));
document.open();
BaseFont bf = BaseFont.createFont(BaseFont.COURIER, BaseFont.CP1252,
BaseFont.NOT_EMBEDDED);
Font font = new Font(bf, 11, Font.NORMAL);
PdfContentByte cb = writer.getDirectContent();
cb.setTextRenderingMode(PdfContentByte.TEXT_RENDER_MODE_INVISIBLE);
Chunk chunk1 = new Chunk("this is a phrase");
//chunk1.setHorizontalScaling(0.5f);
Phrase phrase1 = new Phrase(chunk1);
Image tiff = Image.getInstance("iText.tif");
document.add(tiff);
Phrase phrase2 = new Phrase(new Chunk(tiff, 0f, 0f));
ColumnText.showTextAligned(cb, 0, phrase1, 100f, 300f,
Element.ALIGN_UNDEFINED);
ColumnText.showTextAligned(cb, 0, phrase2, 0f, 0f,
Element.ALIGN_UNDEFINED);
ColumnText.showTextAligned(cb, 0, phrase2, 50f, 100f,
Element.ALIGN_UNDEFINED);
ColumnText.showTextAligned(cb, 0, phrase2, 50f, 200f,
Element.ALIGN_UNDEFINED);
}
catch (Exception de)
{
de.printStackTrace();
}
// step5
document.close();
}
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions