473,943 Members | 11,695 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

converting a word doc to pdf in .net

Is it possible to convert a microsoft word document to pdf in .net code. If
anyone has done this before, please let me know.
Jun 13 '07 #1
2 6600
Vinki,

There are a lot of "ifs" in this reply.

First, if you are using Office 2007 documents, then the content is XML
(for the most part). You can easily parse this and feed any PDF generator
with this content.

If you are not using pre-Office 2007 documents, but they are stored in
WordML (another XML format for Word documents), then you can use that
content to feed a PDF generator.

If you have Office 2007 installed, then you can load any word document
and save it through automation. MS released a plugin for Office 2007 which
allows the saving of Word documents in PDF format.

If you have a version prior to Office 2007 installed, then I believe
Adobe has a plugin which allows the saving of Word documents to PDF.

If you are running in an ASP.NET environment, then the first two options
are your only viable ones, really, as automating Word in an ASP.NET
environment is discouraged (that's an understatement when it comes to how
much it is discouraged).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m
"Vinki" <Vi***@discussi ons.microsoft.c omwrote in message
news:C1******** *************** ***********@mic rosoft.com...
Is it possible to convert a microsoft word document to pdf in .net code.
If
anyone has done this before, please let me know.

Jun 13 '07 #2
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c omwrote in
message news:%2******** **********@TK2M SFTNGP03.phx.gb l...
There are a lot of "ifs" in this reply.
And they're all correct, but can all be ignored if you're OK with using the
industry-standard 3rd-party add-in for this:
http://www.aspose.com/Products/Default.aspx
--
http://www.markrae.net

Jun 13 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
4272
by: Davinder | last post by:
can anyone recommend a good tool to convert documents to HTML on the fly. I need to integrate this tool with a VB app so it must have an API. thanks in advance Davinder davinder@gujral.co.uk
20
7381
by: Al Moritz | last post by:
Hi all, I was always told that the conversion of Word files to HTML as done by Word itself sucks - you get a lot of unnecessary code that can influence the design on web browsers other than Internet Explorer. Our computer expert in my company had told me already a while ago that I should learn HTML and encode myself. I was never inclined to do so (I am no computer expert), and when upon his suggestion I looked how my pages (converted to...
4
1650
by: Drew | last post by:
Here at work, we have 2 copies of our policies and procedures. We have a Word format, and a PDF format. The problem is that when a policy is changed (there is a commitee meeting every month), the Word doc file is updated, and then a different user has to convert it to PDF (We only have 2 licenses for Acrobat). I would like to try to develop a solution, where the user updates the doc file, and then goes to a page on our intranet, where...
8
5755
by: prabha | last post by:
Hello Everybody, I have to conert the word doc to multiple html files,according to the templates in the word doc. I had converted the word to xml.Also through Exsl ,had finished the multiple output html files. The problem is while reading through the worddoc paragraph,the special characters are not identified. So in the xml file,it's just storing that as "?".So I couldn't able to retrive the characters in my ouput html files.
2
5767
by: Asbjørn Ulsberg | last post by:
Hi. I'm trying to convert Brady Hegberg's great RTF2HTML VB 6.0 module to C#. I've managed to convert the VB code to VB.NET, which gave me the following code: Option Strict On Option Explicit On Option Compare Binary
12
1808
by: AMP | last post by:
Hello, I have in c: WORD calcChecksum(BYTE data, WORD length) { WORD* i_data; WORD checksum= 0; BYTE i= 0; i_data= (WORD*)data;
2
1769
anukagni
by: anukagni | last post by:
Hi, iam having an database for that i have created an user manual includes help topics ..I prepared in the word format and i want to covert this to html help . Iam having Ms Html workshop but i found to hard to create any body sugess me to create an html help by converting the word matters too.... needed solution ... thanks in advance.. thanks, anukagni
1
1317
by: =?Utf-8?B?U3FsQmVnaW5uZXI=?= | last post by:
I want to automate a process of converting documents (*.doc) to html pages using C#. Please note that documents might contain images within it. Any pointers in this regard would be of great help to me. Thanks! Regards Pradeep
5
9125
by: Frederik Van Bogaert | last post by:
Hi! I've taken my first steps into the world of c++ by trying to write a text adventure game. Things are proceeding fine, but there's some code in there that isn't very well coded. More specifically, I use the following code: ... string word ; size_t pos = action.find(" "); word = action.substr (0,pos); if (pos < action.size() - 2)
1
1537
by: ganesh22 | last post by:
Hi, Iam getting the below error while my application is running on IIS. in my application iam converting a text into word format, so i added some .dll from COM for converting word format error: Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005.
0
10142
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9970
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10666
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9866
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8228
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6311
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4913
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3516
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.