I am using itext-2.0.0.jar APIs to insert an image(bar code) to my RTF template.
Every thing works fine in MS Word. But the content is seems to be missing when opening the same file in Word pad.
The problem occurs only if  I insert an image, normal texts and tables works fine in Word pad.
Any idea will be greatly helpful.
Please see the attached code.
  File f = new File(userDir+"\\"+FILENAME+"_"+user+".rtf");
        FileOutputStream fos = new FileOutputStream(f);
        RtfWriter2 rtf=RtfWriter2.getInstance(document,fos);
        java.awt.Image  barImage=generateBarcode(proposalNumber);
        String imagefile=saveImage(barImage,user);
        rtf.getDocumentSettings().setDataCacheStyle(RtfDataCache.CACHE_DISK);
        rtf.getDocumentSettings().setAlwaysUseUnicode(true);
        rtf.getDocumentSettings().setOutputDebugLineBreaks(true);
        document.open();
        Image imgg=    Image.getInstance(imagefile);
        document.add(imgg);
        document.close();
--
-------------------------------------------------------------------------
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
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to