MS Word file conversion to PDF technology is much more, the more common scenario is to use open source OpenOffice, but there is a compatibility problem, some files can not be converted or problems. And the use of off-the-shelf products, the cost is relatively high. By taking a comprehensive look at the various Word to PDF solutions, the scenario of invoking word interfaces on the Windows platform is one of the most successful conversions, offering a compromise scenario here.
Set up Windows Server and install MS Office 2007, using the MS Office 2007 conversion PDF feature. Office 2007 only needs to install one add-in to export files and save them in PDF and XPS formats, resulting in high-quality PDFs. Microsoft Office Add-ons: Microsoft Save as PDF or XPS.
Additional Note: Office 2007 with SP2 has built-in Save as pdf/xps support, or you can save Word as a PDF directly in Word. As shown in the following:
Deploy Java programs on the Windows Server to accept requests from the application server, read the appropriate files on the FTP locally, and invoke Microsoft Word's interface, convert it to PDF format, and push it to the appropriate location in FTP.
Possible problems and coping strategies:
(1) Large number of concurrency problems
If there is a lot of concurrency, it could cause Windows Server resources to be consumed too much and there is a risk of the translator crashing. For this scenario, the Message Queuing mechanism can be used to write the request to the message queue and process it one by one.
(2) Real-time problems
Converting a file takes time, and the real-time nature of the operation may be unfriendly. can enhance server performance, shorten the conversion time, or through the change of user operation mode, avoid real-time operation, change to delay operation.
(3) The problem of conversion failure
It is necessary to capture the exception of the conversion program in detail, log it for subsequent processing and program optimization, and give the user detailed feedback information, explain the situation, and do not affect the subsequent request processing.
Reference:
Summarize several common word conversion PDF methods
Thank colleagues for providing solutions and practice, welcome to exchange.
Conversion of MS Word file to PDF technology in office system