as a result of a client's project needs to be converted into WORD Document PDF format, so it stands written in this tutorial, involving knowledge points: thread call, asynchronous threads, thread asynchronous callback function, C # of category, WSH script host development. Needs analysis: project customers B/S structure mainly to provide a WORD document in the background automatically converted to PDF, after the actual test, if the articles have a WORD document of more than 100 pages, the conversion of about 20 minutes time (Environment: CPU is a Pentium M 1.6G, 512M memory), CPU occupancy rate of the entire near-95% ~ 100%, the results tell the customer, the customer is proposed: after work to the client, automatically converted to PDF, and if the user confirm that you want to view the PDF documents, without conversion, to provide choice to customers, is now converted into PDF, or after work on the client server, automatic conversion.
project function: needs analysis by the two functions to write, The first is: B/S structure of the background conversion, to be submitted to the customer to choose The second is: Windows service automatically converted into WORD document PDF
these two categories: the core of the conversion process is implemented using threads, but the first function is a WORD document, the second function does not convert all WORD documents.
analysis to the present: we begin the actual conversion!
I: an essential tool Tools necessary to install MS VS.Net2003, MS Office2003, Adobe Acrobat 7.0 Professional, postscript.exe, gs811w32.exe
The installation of MS VS.Net2003 not say MS Office2003 does not indicate the installation
postscript.exe can be installed by default, it is a PDF conversion script needed gs811w32.exe can be installed by default, it is actually a PDF virtual printer driver
(postscript.exe and gs811w32.exe resources area can be downloaded at this site)
|