Works correctly using the code in the CVS.

Paulo

----- Original Message ----- 
From: "Amy_D" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, April 25, 2008 9:52 AM
Subject: Re: [iText-questions] RTF and iTextSharp


>
> Thank you for the quick response.
> Here is the stack trace:
>
>   at System.IO.__Error.FileNotOpen()
>   at System.IO.FileStream.Flush()
>   at iTextSharp.text.pdf.OutputStreamCounter.Flush()
>   at iTextSharp.text.DocWriter.Close()
>   at iTextSharp.text.rtf.RtfWriter2.Close()
>   at iTextSharp.text.Document.Close()
>   at eLDA.Controller.Controller.Controller.WriteToRTFDocument(DataSet
> ldsData, PDFGenerationMessage& lobjPDFGenerationEntity) in
> D:\Amanda\ELDACodeForACSRTF\Controller\Controller\ADSController.cs:line 
> 583
>
> Message: Cannot access a closed file.
> Source: mscorlib
> TargetSite: {VoidFileNotOpen()}
>
> Thanks,
> Amanda
>
>
> Mark Hall-6 wrote:
>>
>> Hi,
>>
>> please provide the stack trace for the error. Without that we can only
>> speculate. Perhaps a bug was introduced in the porting process, perhaps
>> there's some weird interaction in your code.
>>
>> Greetings,
>> Mark
>>
>> On Friday 25 April 2008, Amy_D wrote:
>>> Sorry, i have been trying all sorts of code for this problem and i just
>>> manually typed out that code in the mail...
>>> here is the one i have been trying to use:
>>>
>>> RtfWriter2 writer2 = RtfWriter2.GetInstance(lobjDocument, new
>>> FileStream("sample.rtf", FileMode.Create));
>>> //I have tried using FileOutputStream, it gives me an error.
>>>
>>>  Paragraph parTitle = new Paragraph("This is an RTF document",
>>> FontFactory.GetFont(FontFactory.HELVETICA, 16,
>>> iTextSharp.text.Font.BOLD));
>>>
>>> lobjDocument.Open();
>>> lobjDocument.Add(parTitle);
>>> lobjDocument.Close(); --- Run time error : Cannot access a closed file.
>>>
>>> What i really want to do is use the properties TableFitsPage or
>>> KeepTogether or CellsFitPage which i cannot do using the Rtfwriter.
>>>
>>> Thanks,
>>> Amanda
>> -- 
>> All replies must be addressed to the mailing list.
>> Any replies/questions not addressed to the mailing list will be ignored.


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar

Reply via email to