Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Channels ▼
RSS

.NET

Automating Applications On-the-Fly


Third-Party PDF Solutions

We contacted the vendor who was willing to augment their existing web service to offer us a web method to retrieve their source information. Now we had to decide how we should generate the PDF document. Knowing that it wasn't practical or reasonable to roll our own PDF generation tool, I began to look at third-party PDF solutions. I considered some open-source tools and other component vendors, but decided on PDF.Web—a component included with Syncfusion's Essential PDF suite (www.syncfusion.com)—for several reasons:

  • We have had excellent prior experience with some of Syncfusion's other tools.
  • Its Direct-Tac support system is excellent.
  • Syncfusion offers multiple methods for generating PDFs, including doing so from a source other than a file (requirement).
  • Its components have always emphasized performance (requirement).
  • If new versions are released, it is very easy to maintain with Syncfusion's Assembly Manager Tool (requirement) and, if the Syncfusion assemblies aren't deployed to the GAC, they just have to reside in the bin folder. No other configuration is necessary.
  • We already own its Essential Studio product so we wouldn't need to spend any additional budget dollars (requirement).

Most of the other solutions we considered involved writing content first to a file, then printing the file with a PDF print driver. Some were just too heavy to be viable in a high-traffic web environment, and others poorly documented. Some candidate solutions looked like they might fit the bill, but deployment ended up being an issue due to using COM.

Using PDF.Web

Having selected PDF.Web, I began investigating how it works. I'd had lots of experience using PDF writers that depended on a standard coordinate system to layout content and was expecting the same with PDF.Web. Although the coordinate system gives great granular control when laying out complex content, it's cumbersome and increases developer time to build documents since small layout errors can be hard to find. I was happy to see that Syncfusion offers both a Coordinate (Standard and Cartesian) system as well as something called "Document Logical Structure" (DLS)—a "flow layout" manager. Knowing that my content was mainly text with a single masthead image, I elected to use the DLS layout and let it handle margins, page length, and other layout matters that usually make you want to pull your hair out.


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.