Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » iText »

[iText-questions] Help in the creation of the PDF

Nicodemo Fumo

2005-06-09

Replies:

Hello,
I'm sorry for my not perfect english but i have a problem in the creation of the PDF.
I need to highlight parts of text and the document have an image of background.
In the visualization appears this error "operazione 'm' non valida in un testo''. What means?
 
This is the part of code:
 
private static void inserisciTestoIncasellato(PdfContentByte cb, PdfContentByte cb1, String sTesto, float x, float y) throws BadElementException, DocumentException,                                                                                                                                                                                 MalformedURLException, IOException{
    cb.setFontAndSize(BaseFont.createFont(BaseFont.COURIER, BaseFont.CP1252, BaseFont.NOT_EMBEDDED), 12);
 
    cb1.setLineWidth(10f);
    cb1.moveTo( (float) ( (x - 1 + X_SPACE * i) * CONV),  (float) ( (Y_DIM - y + 1) * CONV));

    cb1.lineTo( (float) ( (x - 1 + X_SPACE * i + X_SPACE) * CONV), (float) ( (Y_DIM - y + 1) * CONV));

    cb1.setColorStroke(new Color(0xFF, 0xFF, 0x00));
    cb1.stroke();
    cb.showTextAligned(PdfContentByte.ALIGN_LEFT, sTesto.charAt(i) + "",  (float) ( (x + X_SPACE * i) * CONV),  (float) ( (Y_DIM - y) * CONV), 0);
 
where is the error?
 
Thank you for yuor availability.
regards
©2008 junlu.com - Jax Systems, LLC, U.S.A.