I am using RtfWriter2 to create a document based on a number of database 
records.  That part is working great.  There is a static introduction to the 
document that I thought I could import using the importRtfDocument method.  I 
must be leaving something out, because the introduction never gets added.  Has 
anyone used this method successfully?  If so, could you advise me on what I am 
doing wrong?

Document document = new Document();
ByteArrayOutputStream out = new
ByteArrayOutputStream(OUTPUT_BYTE_ARRAY_INITIAL_SIZE);
RtfWriter2 rtfWriter2 = RtfWriter2.getInstance(document,out);
document.open();
InputStream intro =
  
rtfWriter2.getClass().getClassLoader().getResourceAsStream("monographIntro.rtf");
if (intro != null)
  logger.info("Intro is not null: " + intro.available());
else
  logger.info("Intro is null");
Reader reader = new InputStreamReader(intro);
rtfWriter2.importRtfDocument(reader);

// add the dynamic data to the document

document.close();



The document has the dynamic content, the "intro" InputStream is not null and 
has data, but the document does not include any "intro" text.  

Thanks,
Stuart
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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