An other problem:
I need to have a customized page.
To do so I modified the Events sample with romeo and Juliet to add a custom
header.
So in the method onEndPage I've inserted the code:
Rectangle border = new Rectangle(0f, 0f);
border.setBorderWidthLeft(0f);
border.setBorderWidthBottom(1f);
border.setBorderWidthRight(0f);
border.setBorderWidthTop(0f);
border.setBorderColorTop(Color.BLACK);
Image logo = Image.getInstance("MyLogoImage.png");
PdfPCell cellTop = new PdfPCell(logo);
cellTop.setVerticalAlignment(Element.ALIGN_MIDDLE);
cellTop.setHorizontalAlignment(Element.ALIGN_LEFT);
cellTop.cloneNonPositionParameters(border);
cellTop.setUseBorderPadding(true);
cellTop.setPadding(padding);
head.addCell(cellTop);
head.setTotalWidth(page.width() - PDFCreator.marginLeft -
PDFCreator.marginRight);
head.writeSelectedRows(0, -1, PDFCreator.marginLeft, page.height() -
PDFCreator.marginTop +
head.getTotalHeight(),writer.getDirectContent());
but in the pdf generated thetext paragraph begin before the logo ends and
the text overlap the logo image ant the lower border line of the logo image.
How can I resolve the problem?
--
View this message in context:
http://www.nabble.com/insert-image-from-xml-file-tf2521449.html#a7075246
Sent from the iText - General mailing list archive at Nabble.com.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions