DynamicPDF ToolkitOne™ RAD Edition Overview (Part 1)

Wed, June 20 2018, 10:34 AM (US Eastern Time)

DynamicPDF is excited to release the RAD Edition of ToolkitOne™. Unlike our PRO Edition of ToolkitOne™ that shares many of the features of our Core Suite in an updated, cross platform API, we focused this product enhancement on rapid application development (hence the name). We also refer to this as rapid PDF development since it is designed to get the PDFs your users need to them in a fast and efficient way. These include:

  • Rapid PDF development using DynamicPDF Designer (ToolkitOne™ Edition)
  • Rapid PDF development using HTML and CSS
  • Creating PDFs from multiple PDFs (merging)

Today, we'll take a look at (1) creating PDFs using HTML and CSS and (2) creating PDFs from multiple PDFs. Be sure to check back on this blog for our discussion (in Part 2) on creating PDFs using DLEX templates from Designer.

Creating PDFs from HTML and CSS

A powerful feature of the RAD edition is its ability to quickly create PDFs using HTML. If you are already delivering reports to your users in HTML, you can quickly and easily use the same processes to create PDFs utilizing the HtmlLayout class. This class takes your HTML, allows you to set headers and footers and returns a paginated Document class. Let's take a look at these elements separately.

The HtmlLayout constructor establishes the HTML to use along with the dimensions of the page through a PageInfo class. Using the PageInfo class you can specify a page size and orientation or use a page from an existing PDF as a background template. A base ref can also be set through the constructor when needed:

Uri htmlSource = new Uri(@"C:\MyHTMLReport.html");
HtmlLayout htmlLayout = new HtmlLayout(htmlSource, new PageInfo(PageSize.Letter, PageOrientation.Portrait));

You can then quickly set left, center, and/or right justify headers and footers on your layout using the header and footer properties. The headers and footers share the same style information as the HTML so they will have the identical appearance. A span tag can also be used to select a CSS class or change the style. Setting the HasPageNumbers property to true, will cause the header or footer element to be parsed for page numbering info (e.g. "Page 1 or 3"):

htmlLayout.Header.Left.Text = "My PDF Report";
htmlLayout.Header.Right.Text = "Report for my User";
htmlLayout.Footer.Center.Text = "Page %%CP%% of %%TP%%";
htmlLayout.Footer.Center.HasPageNumbers = true;

Once everything is all set, simply call the Layout method to return a Document object containing the HTML laid out over as many pages as needed. You can then save it or work with it as you would any other Document object:

Document document = htmlLayout.Layout();
Creating PDFs from Multiple PDFs (Merging)

Merging PDFs together is also a simplified process. If you'd like to simply merge two PDFs together, you can use the Document class's static Merge method:

Document document = Document.Merge(@"C:\MyFirstPDF.pdf", @"C:\MySecondPDF.pdf");

You can also append PDFs to an existing Document object, or take the Document object you created using HTML above and append PDFs to it:

Uri htmlSource = new Uri(@"C:\MyHTMLReport.html");
HtmlLayout htmlLayout = new HtmlLayout(htmlSource, new PageInfo(PageSize.Letter, PageOrientation.Portrait));
Document document = htmlLayout.Layout();
document.Append(@"C:\MySecondPDFToAppend.pdf", 1, 3);
Wrap Up

We've seen how easy it is to create PDFs using HTML and merge PDFs together using the DynamicPDF ToolkitOne™ RAD Edition. The object model is very flexible and there are of course many other more advanced features like creating PDFs in memory, using HTML from a URL, and disk buffering, all of which is covered in our help docs. Please check back for Part 2 of this post, where we'll explore rapid PDF development using Designer templates (DLEXs) and your business objects.

Tags: , , , , , , , , , ,

Version 9 Release of Dynamic PDF for .NET Core Suite

Tue, December 12 2017, 2:43 PM (US Eastern Time)

DynamicPDF for .NET Core Suite v9 (this includes our Merger, Generator and ReportWriter products) has now been fully released.  Download it Today!

Version 9 adds tons of useful and exciting new features including:

  • HTML Rendering (convert HTML pages including CSS)
  • Disk Buffering (incremental PDF rendering decreases memory usage)
  • Character Shaping (for fonts of complex scripts)
  • Over 20 New Barcodes (Aztec, Code 11, Code 93, GS1 Databar, Australia Post, etc.)
  • Package PDFs
  • XFA Static Form Filling
  • Document, Page and Field Actions
  • Take a look at a full list of All Version 9 Full Features

What might be our best feature...Lower Prices across the board (all editions, all license models).

Free upgrades for Maintenance customers, discounted upgrades for eligible existing customers, eligible upgrades can be accessed via our Customer Area, www.dynamicpdf.com/customerarea or we can be contacted directly, sales@cete.com or +1 410.772.8620.

Tags: , , , , , , , , , , , , , ,

DynamicPDF for .NET Core Suite Version 9 BETA Release

Thu, April 27 2017, 2:16 PM (US Eastern Time)

The DynamicPDF Core Suite for .NET Version 9.0 BETA has just been posted to our site for download and testing.

DynamicPDF Core Suite for .NET v9 Beta Download

We have added some great new features in version 9 including support for PDF portfolios, an HTML Area, XFA static form filling, improved memory handling for large PDFs, several new barcode types (Code 93, Aztec, GS1 Databar, Australia Post, Singapore Post etc.) and more. Take a look at the full list of new features.

Email support@cete.com with any questions or issues and thanks for taking part in our Version 9 BETA.


Tags: , , , , , , , , , ,

DynamicPDF for Java Version 8 Release

by Anil S

Fri, September 25 2015, 2:02 PM (US Eastern Time)

Our DynamicPDF for Java version 8 has now been fully released.  Download it Today!

This version 8 includes DynamicPDF Generator & Merger. The download includes the updated documentation and examples (Java source code, Servlets, JSPs).

Version 8 adds lots of new features including additional support for PDF/A-2, PDF/A-3, MSI (Modified Plessey) & RM4SCC (Royal Mail) barcodes, strikethrough text, duplicate image removal, individual form field flattening as well as overall efficiency improvements and stabilizations. Take a look at our Version 8 Full Feature List.

For existing customers, eligible upgrades (free with Maintenance, discounted with previous versions) can be accessed via our Customer Area, www.dynamicpdf.com/customerarea or anyone can contact us directly, sales@cete.com or +1 410.772.8620.

Tags: , , , , , ,

Creating PDFs in C# with Outlined or Invisible Text

Thu, August 30 2012, 1:51 PM (US Eastern Time)

DynamicPDF Generator has lots of predefined page elements which allow you to easily create different types of content, but you may occasionally have a need to do something that is not available in the API by default. Custom page elements is an easy way to extend the API to achieve these results.

We get questions from time to time on how to add outlined text to a PDF. By outlined text I mean text that is not completely filled in with a color but rather is just an outline of the font and nothing filled in the middle of the text.  This is a great situation for using a Custom page element and the C# code below shows how to extend the TextArea page element to add this functionality:

using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;

public class OutlinedTextArea : TextArea
    // Member variable to store Border Width
    private float borderWidth = 1.0f;

    // Constructors. Additional ones can be added to model TextArea
    public OutlinedTextArea(string text, float x, float y, float width, float height)
        : base(text, x, y, width, height) { }
    public OutlinedTextArea(string text, float x, float y, float width, float height,
        Font font, float fontSize)
        : base(text, x, y, width, height, font, fontSize) { }

    // Border Width Property added
    public float BorderWidth
        get { return this.borderWidth; }
        set { this.borderWidth = value; }

    // Override Draw Method
    public override void Draw(ceTe.DynamicPDF.IO.PageWriter writer)
        // Enter Graphics Mode
        // Set Stroke Color and Border Width
        // Enter Text Mode
        // Set Text Rendering Mode
        // Call Draw on base class
        // Enter Text Mode (in case underline is set to true)
        // Set Text Rendering Mode Back to Fill


Tags: , , , , , , , , , , ,

Generating PDFs Dynamically on Android

Fri, June 15 2012, 11:35 AM (US Eastern Time)

I have been using an Android phone for a few years now, and one day I decided I should try to write an Android application using our DynamicPDF Generator for Java. So I decided to start off with a simple "Hello World" application based on the DynamicPDF Generator hello world PDF java example provided with the Generator product.

My goal was to create a PDF on the Android phone when the application was run. I wanted to keep it simple and not even bother with having a GUI for it at this point.

I already had my machine set up with Eclipse IDE, the ADT (Android Developers Tool) plugin and the Android SDK. Here are the steps I followed to create the Android application:

  1. I created a new Android project in Eclipse with the details below. Android version 2.1 is what I tested with, since that is the lowest SDK version I had installed, but it may work with an older version of Android too.

    Project name: HelloWorld
    Build Target: Android 2.1
    Application name: Hello World
    Package name: com.cete.androidexamples.dynamicpdf.helloworld
    Create Activity: DynamicPDFHelloWorld
    Minimum SDK: 7

  2. Since I knew my application had to write to the SD card to output the PDF, I added the WRITE_EXTERNAL_STORAGE permission in the AndroidManifest.xml:
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
  3. More...

Tags: , , , ,

Month List