DynamicPDF HTML Converter Release

Tue, July 28 2020, 10:52 AM (US Eastern Time)

Our new HTML Converter product is now available and is included with any of our subscription plans. It is also available for FREE if you are OK with a small message at the bottom of your PDFs and linkback to our site from a public area of your website. Checkout these great features:

  • Quick HTML to PDF Conversion
  • Supports the latest HTML, CSS and JavaScript
  • Work with files, byte arrays or URLs
  • Custom headers and footers
  • Supports .NET Framework and .NET Core (including Linux)
  • Transparent pricing

Tags: , ,

DynamicPDF Subscriptions are Available

Wed, July 22 2020, 10:47 AM (US Eastern Time)

Subscriptions for our great products are now available. Subscriptions make it easy for you to stay current on the latest features, bug fixes and security patches. They also offer royalty free distribution and work well in cloud environments. Four subscription levels are available:

Tags: ,

Creating PDF Reports with Database Data (SQL)

Thu, July 11 2019, 11:04 AM (US Eastern Time)

DynamicPDF ReportWriter make’s it easy to create reports based on your business objects, but sometimes it may be preferred to access data directly from a database using an SQL query or stored procedure. This can easily be done by utilizing one of these report data classes:

Let’s take a look at the steps involved with doing this. First, attach an event to the DocumentLayout’s ReportDataRequired event. This event will be called anytime a report or sub report requires data.

// Create the document's layout from a DLEX template
DocumentLayout documentLayout = new DocumentLayout(Util.GetResourcePath("SimpleReport.dlex"));

// Attach to the ReportDataRequired event
documentLayout.ReportDataRequired += DocumentLayout_ReportDataRequired;

Now in that event, first check the elementId of the report or sub report that is requesting the data. This is necessary in case there are multiple reports or sub reports in your document layout. Next, create a DataReader or DataTable and use it to create a DataReaderReportData or DataTableReportData class. Then set the event’s RepartData event argument to it.

private static void DocumentLayout_ReportDataRequired(object sender, ReportDataRequiredEventArgs args)
{
    if (args.ElementId == "ProductsReport")
    {
        string sqlString =
            "SELECT ProductName, QuantityPerUnit, UnitPrice " +
            "FROM   Products ";

        SqlConnection connection = new SqlConnection(connectionString);
        SqlCommand command = new SqlCommand(sqlString, connection);
        connection.Open();
        SqlDataReader reader = command.ExecuteReader();
        args.ReportData = new DataReaderReportData(connection, reader);
    }
}

Lastly, layout your DocuementLayout to a Document and output the PDF.

// Specify the data
NameValueLayoutData layoutData = new NameValueLayoutData();
layoutData.Add("ReportCreatedFor", "Alex Smith");

// Layout the document and save the PDF
Document document = documentLayout.Layout(layoutData);
document.Draw(outputFilePath);
Wrap Up

A C# Visual Studio project demonstrating this is available on GitHub:

https://github.com/DynamicPDF/dotnet-pdf-report-from-database

If you have any questions or comments, I would love to hear from you.

Tags: , , , , , ,

DynamicPDF Converter v2 for .NET Release

Wed, July 3 2019, 6:30 PM (US Eastern Time)

This version is a huge leap forward for the product. Here are some of the great new features and improvements:

  • Chromium based HTML Conversion Engine
  • New file type specific converter classes with advanced options
  • More events to monitor the conversion process
  • Printer driver is no longer required for most conversions
  • Many stability and efficiency improvements

Download v2 Today!

Tags: , , , ,

Creating PDFs with Custom XMP Schema's

Mon, June 3 2019, 4:23 PM (US Eastern Time)

XMP metadata is a powerful tool for describing the contents of a PDF document. DynamicPDF has built in support for many of the most popular schemas:

However, there are times when you may need to embed other metadata in a PDF. This can easily be done by creating a class that inherits from the XmpSchema base class and overriding the Draw method. This Draw method will then be called when the XMP metadata is being added to the PDF. First let’s define a CustomSchema class that inherits from XmpSchema:

class CustomSchema : XmpSchema
{
    private string userName;
    private DateTime creationDate;

    public CustomSchema(string userName, DateTime creationDate)
    {
        this.userName = userName;
        this.creationDate = creationDate;
    }

    protected override void Draw(XmpWriter xmpWriter)
    {
        xmpWriter.BeginDescription("http://ns.adobe.com/xap/1.0/", "xmp", " ");
        if (userName != null) xmpWriter.Draw("\t\t" + userName + "\n");
        xmpWriter.Draw("\t\t" + creationDate.ToString("yyyy-MM-dd'T'HH:mm:sszzz") + "\n");
        xmpWriter.Draw("\t\t" + xmpWriter.Producer + "\n");
        xmpWriter.Draw("\t\t" + xmpWriter.Date.ToLocalTime().ToString("yyyy-MM-dd'T'HH:mm:sszzz") + "\n");
        xmpWriter.EndDescription();
    }
}

Notice that the Draw method starts by calling the BeginDescription method and ends by calling the EndDescription method. XMP metadata is XML based, and these methods are responsible for the opening and closing XML tags for the custom schema. The Draw method that is called multiple times between them is then responsible for outputting the other XML data.

Next, we will add the CustomSchema class we created to the XMP metatdata of the document:

XmpMetadata xmpMetadata = new XmpMetadata();
xmpMetadata.AddSchema(new CustomSchema("John", DateTime.Now));
document.XmpMetadata = xmpMetadata;

The following custom metatdata will now appear in the PDFs XMP metadata:

<rdf:Description rdf:about=' ' xmlns:xmp='http://ns.adobe.com/xap/1.0/'>
    <xmp:CreatedBy>John</xmp:CreatedBy>
    <xmp:DateCreated>2019-06-03T16:18:17-04:00</xmp:DateCreated>
    <xmp:CreatorTool>DynamicPDF for .NET v10.12.0.40 (Build 38759)</xmp:CreatorTool>
    <xmp:MetadataDate>2019-06-03T16:18:17-04:00</xmp:MetadataDate>
</rdf:Description>
Wrap Up

A C# Visual Studio project demonstrating this is available on GitHub:

https://github.com/DynamicPDF/dotnet-custom-xmp-schemas

If you have any questions or comments, I would love to hear from you.

Tags: , , , , , ,

Working With Bookmarks When Merging PDFs

Wed, May 8 2019, 10:25 AM (US Eastern Time)

When merging PDFs together using DynamicPDF Merger or Core Suite, all bookmarks (or outlines) will be added to the output PDF by default. They will appear in the order they are merged, with the first document's bookmarks coming first, followed by the next document's bookmarks. However, this is not always the desired behavior, so let's take a look at a couple of other options.

Adding a Bookmark For Each Document

Sometimes you may want to add a bookmark for each document, but remove any of the bookmarks that are in the original PDFs. Accomplishing this can easily be done by adding a bookmark for each document and setting the Outlines merge option to false:

MergeDocument document = new MergeDocument();
MergeOptions mergeOptions = MergeOptions.Append;
mergeOptions.Outlines = false;
document.Outlines.Add("Bookmark for PDF", new XYDestination(document.Pages.Count + 1, 0, 0));
document.Append(fileName, mergeOptions);

The full example file is available here.

Organizing Bookmarks For Each Document

Other times you may want to add a bookmark for each document and place the original document's bookmarks as children. This can quickly be done by creating a bookmark for each document and setting the RootOutline merge option property to that bookmark:

MergeDocument document = new MergeDocument();
MergeOptions mergeOptions = MergeOptions.Append;
Outline outline = document.Outlines.Add("Parent Bookmark for PDF",
    new XYDestination(document.Pages.Count + 1, 0, 0));
mergeOptions.RootOutline = outline;
document.Append(fileName, mergeOptions);

The full example file is available here.

Wrap Up

A C# Visual Studio project demonstrating this is available on GitHub:

https://github.com/DynamicPDF/dotnet-merge-pdf-bookmarks

There are of course many other options for how you may want to deal with bookmarks as well. If you have any questions or comments, I would love to hear from you.

Tags: , , , ,

DynamicPDF Converter v1.1 Release

Wed, March 13 2019, 12:59 PM (US Eastern Time)

Converter is evolving. ceTe Software is excited to announce the release of DynamicPDF Converter v1.1 for .NET with a new Chromium based HTML conversion engine. Version 1.1 is a free upgrade for all current v1.0 users. Upgrade or evaluate it for free today.

Download v1.1 Today!

Also, stay tuned for the BETA release of v2 coming in April.

Version 1.1 (Available Now):
  • New Chromium based HTML conversion engine
  • Latest bug fixes including one caused by a recent Windows update
Version 2.0 (Coming Soon):
  • Many new conversion options
  • Performance improvements
  • No print driver requirement for all conversion types

Tags: , , ,

DynamicPDF Viewer v3 for .NET Release

Tue, February 19 2019, 11:32 AM (US Eastern Time)

Version 3 of our customizable, embeddable .NET PDF Viewing control is here. DynamicPDF Viewer for .NET v3 adds a lot of new features including:

  • Support for localization
  • On demand page thumbnail generation
  • Ability to assign viewer functionality to a PdfToolStrip
  • Customize the search result highlight color
  • Ability to show or hide scroll bars
  • An improved PDF rendering engine

And best of all, it is available with 100% royalty free distribution and a free full featured evaluation edition.

Download v3 Today!

Tags: , , , , , ,

DynamicPDF Rasterizer for .NET Version 3 is Released

Fri, February 8 2019, 10:50 AM (US Eastern Time)

DynamicPDF Rasterizer v3 for .NET has been released! The new version has support for .NET Standard 2.X including .NET Core 2.X and ASP.NET Core 2.X. It includes an updated and improved PDF rendering engine as well as many new features and the latest bug fixes. Also, the developer edition now allows for 100% royalty free distribution to an unlimited number of servers or machines at a lower price point.

Download v3 Today!

Tags: , , , , ,

DynamicPDF PrintManager for .NET Version 4 is Released

Thu, November 29 2018, 9:14 AM (US Eastern Time)

DynamicPDF PrintManager v4.0 for .NET is live! The new version has an updated and improved PDF rendering engine as well as the latest bug fixes. Also, the developer edition allows for royalty free distribution to an unlimited number of servers or machines.

Download v4 Today!

Tags: , , ,

Month List