Why You Should Consider Aspose.Words for Microsoft Word to PDF Conversions

Blog Barista: Sokwhan Huh | August 15, 2019 | Development Tools | Brew time: 5 min

John E. Warnock, the cofounder of Adobe, had a mission in 1990. In his very conspicuously named memo “The Camelot Project,” John best summarizes the difficulty many industries faced in sharing documents:

“What industries badly need is a universal way to communicate documents across a wide variety of machine configurations, operating systems and communication networks. These documents should be viewable on any display and should be printable on any modern printers. If this problem can be solved, then the fundamental way people work will change.”

Thus, the Portable Document Format (PDF) was born.

Developed by Adobe in June 1993, PDF does an excellent job at presenting documents with text formatting and images in a manner independent of operating systems. But, did you know that PDF has one of the most sophisticated specifications for a file format? It’s so sophisticated and complex that common reporting engines such as SSRS (SQL Server Reporting Services) and Crystal Reports sometimes do a poor job at rendering PDF content, which can be problematic.

For instance, KL&A is currently developing a web-based Licensing Portal System (LPS) for a governmental client to handle their licensing needs, and part of what LPS needs to satisfy is the ability to convert Microsoft Word (.docx) documents into PDF format. Therefore, we needed to identify the most efficient and effective way for our system to convert the files correctly since we knew it wasn’t safe to rely on the reporting system being utilized by LPS. So, we assessed three possible approaches:

1.  Launch a Microsoft Word, OpenOffice, LibreOffice or something similar as an independent process (called Interop in .NET land) and have it convert the document to PDF. This would’ve been the easiest and most accurate way to perform the conversion, but the concerns with scalability, licensing (Microsoft frowns upon this practice) and fragility (any updates to the Word software could break this) quickly ruled this option out.

2.  Have a cloud service convert the Word document into PDF. Since LPS is being deployed on the State’s hardware, there were security concerns over sending the file outside of the State’s network, so this was not an option either.

3.  Leverage a .NET library to programmatically convert the Word document’s OpenXML language into PDF’s Postscript language. Unsurprisingly, this was our only option.

We evaluated 18 different libraries and Aspose.Words was one of only two libraries that successfully converted Word documents into PDFs. As you can see from the images below, Aspose.Words works great. The conversions are completed in the backend of the system, so it allows the users to simply click the “download” link and have a PDF generated without any issues.

The other 16 libraries we tried either failed to retain the formatting correctly, or crashed while attempting to convert the document. Between the two libraries that worked, we chose Aspose.Words for several reasons.

Aspose.Words proved it could perform the conversions quickly and generate PDFs that are high-quality and correct, which allows us to provide the LPS users with a more seamless experience. Aspose.Words also comes with an assortment of advanced features that although won’t all be utilized initially, provides us with some flexibility as our client’s needs may evolve over time. Other features provided by Aspose.Words that we’re excited to use in the future are the ability to programmatically add a watermark to the Word document along with joining and splitting documents, which would remove the need to implement custom PDF stitching.

In addition, Aspose.Words provides far more flexible licensing options, such as a perpetual license. Whereas, a perpetual licensing was not an option with the other products. They also provide fantastic documentation and samples to get up to speed with the technology, which was immensely helpful when we incorporated it into our LPS solution.

So, why should you consider Aspose.Words? Well, if a tremendously difficult document conversion can be done by a few lines of code, then it’s hard to argue why you shouldn’t.

 

This post was modified on September 24, 2019.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Other recent posts:

Recognizing & Embracing Team Differences

Recognizing & Embracing Team Differences

Factors You Should Be Aware of to Ensure Project Success
Blog Barista: Bob Marquis, CPA, PMP | Oct 16, 2019 | Project Management | Brew time: 5 min
Project managers tend to be structured, organized, and process oriented. This is a good thing. Unfortunately for project managers, not everyone on a project is this way. Usually, people aren’t as manageable as a well-documented project plan…

read more

Pin It on Pinterest