I am doing basically the same thing replacing %%VariableName%% with what I
want.  The problem comes when trying to drop a page of rich text in there
the font information does not carry across correctly.

Thanks,

Jon

-----Original Message-----
From: Discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf Of Hevel, Shawn
Sent: Friday, May 04, 2007 1:34 PM
To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
Subject: Re: [ADVANCED-DOTNET] Build RTF Document

Maybe I'm misunderstanding what you are doing.  

I've got an Intranet application that is written in dotnet 2.0 and it reads
an rtf document into stringbuilder variable that I've defined.  I then do a
search and replace for all the variables that I need to replace information
with.  I define a variable in my rtf document like this, {some_variable}.
We then use a product called Neevia that takes our rtf document and converts
it to a pdf document.

This works great for us. 

I hope that helps.


Our vision is to develop an environment that will stimulate the
transformation of data and information into knowledge and wisdom.  Our
mission is to stay focused on the plans and goals with a sense of urgency
necessary to improve the company's profitability and market share.
Shawn Hevel, API, AIT
Lead Programmer Analyst
Information Technology Department
South Carolina Farm Bureau Insurance Companies
Phone: (803) 936-4331
Fax: (803) 936-4629
Work Email: [EMAIL PROTECTED]
Home Email: [EMAIL PROTECTED]


-----Original Message-----
From: Jonathan Heizer [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 04, 2007 2:18 PM
To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
Subject: [ADVANCED-DOTNET] Build RTF Document

Hey,

I have been trying to build an rtf document on the server side of a .Net
remoting application.

Currently the there is a rtf base document that is on the server.  Each time
a request comes though to generate this a new document it is loaded into a
stream object.  From there string replacements are done to insert sections
of text by replacing key words.  This works just fine for plain text.

Now we are trying to also insert 2 large blocks of rich text.  The first
attempt was to take the rich text, remove the items that defined it as a
document and insert that formatted text in directly.  This works most of the
time, but sometimes the fonts of the inserted text gets all jumpled up.  I
figure this is from removing the font table in the document definition...

My next attempt was to load each set of text in richtextboxes and copy and
paste the text in code into the final document.  This works great in that it
carries the formatting over exactly.  The only problem is the header and
footer information are being lost in the richtextbox.  Doh!

So, my options that I can think of at this moment.
1) Buy/Find a textbox control that handles header/footer information.  so
far $1000+ Any free suggestions?
2) Use the copy paste method and try to string add back in the header and
footer definitions. Yuck!
3) Word PIA.  Can this run in multiple threads?  If so it is my worse case
because things are really fast right now and Word can be a mess. Yuck! Yuck!

Any other ideas are very much welcome!


Thanks for any help,

Jon

===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to