473,395 Members | 2,222 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

C#-WEB: Converting Html to .doc or rtf or tiff programmatically

Hi, I am working on a project in which I have to present a wysiwyg editor. I have to save this code as .doc, .rtf or .tiff format in server side. I am using C# and this is a web application.

My question is how to convert such an html page (or html code) to one of these formats. Any suggestions on these ? There are many 3rd party tools for this but I couldn't find a free one.
Mar 10 '08 #1
1 4445
Hi, I am working on a project in which I have to present a wysiwyg editor. I have to save this code as .doc, .rtf or .tiff format in server side. I am using C# and this is a web application.

My question is how to convert such an html page (or html code) to one of these formats. Any suggestions on these ? There are many 3rd party tools for this but I couldn't find a free one.
I have found a solution:

1-)Opening html page with word com object as web page.
2-)Save the file as rtf document by changing the saveformat parameter to rtf. That's all.

3-) For the ones who need to embed the pictures to the file instead of reference you can add the following before saveas:

foreach (WordDoc.Field wfield in uyg.ActiveDocument.Fields)
{
if (wfield.Type == WordDoc.WdFieldType.wdFieldIncludePicture)
{
wfield.LinkFormat.SavePictureWithDocument = true;
}
}
Mar 11 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Dominic | last post by:
Hi guys, In .NET, how can I convert a HTML file to TIFF efficiently? One possible way is that I can first use word automatation to load the HTML up and then print it to TIFF. Is that right?...
3
by: bubbles | last post by:
i have a HTML file and it already has a HTML table and a few rows created by default.. however, i would like to add more rows to this table programmatically may i know how?
1
by: darrel | last post by:
I have two issues: 1) The WYSIWYG content editor we're using for our CMS doesn't truly support xhtml. 2) .net doesn't truly support xhtml my question is if there is a .net...
1
by: Stu | last post by:
Hi, I need to find a method of converting html in to a PDF document on teh server. Can anyone suggest the best way of doing this? Thanks in advance, Stu
0
by: UJ | last post by:
I know this isn't the appropriate place but I was hoping somebody might be able to help. I have a web site that creates html pages for displaying later. I'd like to convert them over to SWF's so...
6
by: Krakatioison | last post by:
I've seen once program which was able to convert any url to JPG file. Once I tried it on cnn.com website and it created the nice jpg, even that the page was scrollable, so it was not using...
9
by: anupamjain | last post by:
Hi, After 2 weeks of search/hit-and-trial I finally thought to revert to the group to find solution to my problem.(something I should have done much earlier) This is the deal : On a JSP...
3
by: varuna | last post by:
Hi, I have doubt on converting html page to .net i mean if i designed a page in frontpage or in a Dreamweaver so that page i mean instead of designing a web page in .net using toolbox i need to...
1
by: Software Engineer | last post by:
Testing htmlspecialchars() PHP Function - Converting HTML Characters http://sqa.fyicenter.com/Online_Test_Tools/Test_htmlspecialchars_PHP_Function.php When data needs to be presented in Web...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.