Word 2007 to PDF - Problem
-
12 มีนาคม 2552 10:22We are using Adobe PDF Maker API to convert word documents to PDF with custom functions such as
switching off formating changes, making insert and deletion text in a customized font color, etc. In order to avoid using Adobe PDF Maker API, we have migrated to Word 2007 'Save AS PDF' API which creates PDF not with customized PDF as we wanted. This we have developed as server based watched folder method to convert programatically
If i open word in read only mode converts with formatting changes and if i open in write mode leaves off track change options, simply converts with commenting.
Is there any to convert word documents with customized functionality as mentioned above using .Net?
Note: When i converting manually working fine.
Regards,
Selvakumar
ตอบทั้งหมด
-
3 มีนาคม 2554 3:01
The "save as" feature is not complete solution to convert word document to pdf file, it will export to plain pdf file. If you want to create professional pdf file, you need the program or free online site which specialize in making pdf files.
I know the Zamzar.com is free online converter and I still want to suggest you using a offline word to PDF converter like adobe maker, since last time I upload my word document to the site, it haven't send me back the pdf file. it's not stable and i am concern about the security of the file.
And if you have found any good means,please share it with us.
Never too old to learn -
27 มิถุนายน 2554 4:02
Have a try Spire.Doc, Easy to Convert Word 97~Word 2010 file to PDF WITHOULE OLE AUTOMATION.
using System;
using Spire.Doc;
using Spire.Doc.Documents;namespace WordToPDF
{
class Program
{
static void Main(string[] args)
{
//Create a new document
Document document = new Document();
//Load word 2007 file from disk.
document.LoadFromFile("WordFile.docx");//Save doc file to pdf.
document.SaveToFile("Sample.pdf", FileFormat.PDF);}
}
}
-
9 มีนาคม 2555 8:04
Hi!
You also can try to use "Useoffice" by Sautinsoft. I think it's a very reliable library. :)
Sample code for You:
SautinSoft.UseOffice u = new SautinSoft.UseOffice(); if (u.InitWord() == 0) { //convert Word (RTF, DOC, DOCX to PDF) u.ConvertFile(@"d:\Brochure.docx", @"e:\Brochure.pdf", SautinSoft.UseOffice.eDirection.DOC_to_PDF); } u.CloseOffice();