简体   繁体   中英

c# manipulate doc and save as pdf

I have been reading a lot of questions about convert doc files to pdf but I haven't read any response which solve my problem.

I tried ASPOSE, which is really good for what we want but it is really expensive and my boss doesn't want to spend a lot of money.

I need to open a docx file, manipulate it and save as pdf. My boss doesn't want the system save the file as docx and then convert to pdf.

Anyone has a simple solution to do that?

Thank you in advance.

PS: We have abcpdf and asppdf components but I didn't find any documentation about open a pdf file and save it as doc

If your boss wants to open a .DOC and save as .PDF then maybe Word or Word automation will help.

Newer versions of Microsoft Word are able to produce PDFs.

EDIT

Here are some links to sample code:

How do I convert Word files to PDF programmatically? (see accepted answer)

Word Doc to PDF Conversion. Command line using VBScript and automation

You can use iTextSharp to read the content and manipulate it then use openxml sdk to create word document from the read information.

Openxml SDK:

http://openxmldeveloper.org/ 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM