Product Reviews

Product Review: Generating Documents with DynamicPDF for .NET

A useful set of tools for creating PDF documents dynamically from code.

ceTe Software DynamicPDF Core Suite for .NET consists of two libraries for you to use at runtime: Generator for dynamically creating PDF documents, and Merger for merging, splitting and filling PDF documents. The ReportWriter and Designer generate PDF reports.

The classes that make up the DynamicPDF Generator for .NET allow you to generate documents up to 2GB in size from code (C# and Visual Basic) in both desktop and Web-based applications. The following code is all that's necessary to create a one-page PDF document with a single TextBox, and then write it to a file:

Dim doc As Document = New Document()
Dim pag As New Page
Dim txta As New TextArea(
  "Hello World!", 10, 20, 50, 15, Font.TimesRoman, 12)
pag.Elements.Add(txta)
doc.Pages.Add(pag)

Dim fs As New FileStream("C:\NewFile.pdf", FileMode.Create)
fs.Write(doc.Draw(), 0, doc.Draw().Count)
fs.Close()

[Click on image for larger view.]
ceTe Software DynamicPDF Designer, which is included in the Core Suite, enables you to create report formats to use with the DynamicPDF ReportWriter.

Printing API
In an ASP.NET application, the Document object's DrawToWeb method lets you output the document to the current WebForm. The DrawToBitmap method lets you generate output that could be displayed in an Image control. ceTe PrintManager gives you a server-side API for sending documents directly to printers. Unfortunately, it's not included in the suite.

Generator supports templates, which allow you to specify repeatable content for headers and footers in documents with multiple pages. However, using Generator to create highly formatted documents from scratch -- which could be very code-intensive -- doesn't reflect the typical business case of creating new editions of standard documents.

DynamicPDF Merger for .NET is the real jewel in the crown because it allows you, from code, to take an existing PDF document and either append or modify it. With Merger, you can create PDF documents in a page-formatting tool, and then use them as templates for creating new editions of those documents.

PDF Reports
While there's nothing wrong with the included ReportWriter, it doesn't yet have all the features of the dominant reporting tools in this area. The main benefit of the DynamicPDF ReportWriter is that output is directly translated into a PDF file.

The Enterprise edition of the DynamicPDF Core Suite for .NET offers additional chart types plus support for bar codes, prepress, archiving and encryption, among other features. Pricing is on both a per-user and per-server basis. You can buy the individual suite components separately but, if you're going to purchase any two of the packages, you might as well buy the Core Suite. The Professional and Enterprise versions of the suite provide a Help library that integrates with Visual Studio and several sample applications (though "Getting Started" tutorials appear to be included only for Generator).

ceTe Software DynamicPDF Core Suite for .NET provides many of the tools that a shop generating PDF documents would need, with only one significant hole: the suite doesn't address printing documents. And while there's nothing wrong with the suite, many shops might find DynamicPDF Merger for .NET, by itself, more useful.

DynamicPDF Core Suite for .NET

ceTe Software
Web: dynamicpdf.com
Phone: 800-631-5006
Price: $899 for DynamicPDF Core Suite Professional server license; $1,599 developer license
Quick Facts: A suite of tools for working with PDF documents, including a report writer
Pros: Excellent set of APIs for creating PDF documents, giving you three tools for the price of two
Cons: For many shops, one of the components -- Merger -- will stand above the rest



About the Author

Peter Vogel is a system architect and principal in PH&V Information Services. PH&V provides full-stack consulting from UX design through object modeling to database design. Peter tweets about his VSM columns with the hashtag #vogelarticles. His blog posts on user experience design can be found at http://blog.learningtree.com/tag/ui/.

comments powered by Disqus

Featured

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

  • What's New for Python, Java in Visual Studio Code

    Microsoft announced March 2024 updates to its Python and Java extensions for Visual Studio Code, the open source-based, cross-platform code editor that has repeatedly been named the No. 1 tool in major development surveys.

Subscribe on YouTube