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();
document.Draw(outputFilePath);
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");
document.Draw(outputFilePath);

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:\MyFirstPDFToAppend.pdf");
document.Append(@"C:\MySecondPDFToAppend.pdf", 1, 3);
document.Draw(outputFilePath);
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: , , , , , , , , , ,

ToolkitOne™ 2018 Beta Release

Fri, April 20 2018, 12:29 PM (US Eastern Time)

Please join us in the BETA testing of our new product: ToolkitOne 2018

DynamicPDF ToolkitOne 2018 Beta

ToolkitOne combines lots of the PDF functionality that DynamicPDF has come to be known for including PDF merging, easy PDF creation, tons of page elements and features, super-efficient output in a well-designed simple API and it is built on .NET Standard 2.0 so there is seamless, cross-platform deployment to any .NET implementation including .NET Core, .NET Framework, Mono, UWP, Xamarin.iOS and Xamarin.Android.

We are available for any questions or issues related to the BETA via email support@cete.com or phone 410.772.8620.

Thanks for everyone’s involvement!

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: , , , , , , , , , ,

DynamicBarcode Creator v2.0 for .NET BETA Release

Tue, February 21 2017, 3:50 PM (US Eastern Time)

The DynamicBarcode Creator for .NET Version 2.0 BETA has just been posted to our site for download and testing.

DynamicBarcode Creator for .NET v2 Beta Download


We have added support for new barcodes in Version 2 that include Code 93, Australia Post, Aztec, Deutsche Post, Singapore Post, ISBN, ISMN, ISSN and many more. Take a look at the complete list of new features.


Email support@cete.com with any questions, issues or any feedback at all and thanks for taking part in our Version 2 BETA.

Tags: , , , , ,

DynamicPDF PrintManager for .NET Version v3.0 Release

by Anil S

Tue, February 7 2017, 11:19 AM (US Eastern Time)

Our DynamicPDF PrintManager for .NET version 3.0 has now been fully released. 

Download it Today!

Version 3 adds lots of new features including support to print multiple pages per sheet, PDF Portfolios, quality based resolution settings, print specified area of a PDF page, retrieve a full list of printers (including installed network printers), print priority and many more. Take a look at our Version 3 Full Feature List.

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

Tags: , , , , ,

DynamicBarcode Creator v1.0 for .NET Beta Release

Wed, December 2 2015, 4:44 PM (US Eastern Time)

ceTe Software would like to introduce a great new tool we recently began Beta testing on.  DynamicBarcode Creator v1.0 for .NET is a 100% .NET library designed for easy and efficient barcode image creation from any Windows, Web or WPF applications.

Download the DynamicBarcode Creator Beta Today!

DynamicBarcode Creator is based on the time-tested barcode rendering contained within our PDF libraries so you know it will have the same level dependability ceTe Software components are known for. 

DynamicBarcode Creator v1.0 for .NET BETA includes the capability to output many linear and 2-D barcode types (Data Matrix, PDF417, QR Code and many more) in several image formats (JPEG, PNG, TIFF, GIF & BMP). Take a look at the Full Feature List.

We appreciate your willingness to take part in this beta testing. Please contact support@cete.com with any questions or issues related to the Beta.

Tags: , ,

PrintManager – Setting Advanced Printer Options

by Anil S

Mon, April 27 2015, 10:24 AM (US Eastern Time)

The PrintManager for .NET API allows printing of PDF files through any .NET application.  The settings accessible to the PrintManager are limited to those exposed through a standard API (such as Win32 or .NET).  But a printer may have additional settings that are specific to that printer and are not readily available through a standard API. This means that there could be non-standard features or settings available that vary between printers that are not able to be exposed through the PrintManager API.  To remedy this, we have exposed a way to manually save and reuse a specific state of the native printer’s dialog box that when provided to the Printjob will affect that job as if those options where manually selected by a user.  A full example on how to accomplish this is outlined below.

We will start with the code to invoke printer’s native dialog box and save the settings to a file.

To invoke the printer's advanced setting dialog we will be using a Win32 function called "AdvancedDocumentProperties".

AdvancedDocumentProperties(IntPtr.Zero,IntPtr.Zero,e.PrintJob.Printer.Name,e.DevMode, e.DevMode);

In order to import the above function to a .NET application, use the following DllImport.

[DllImport("winspool.Drv", EntryPoint = "AdvancedDocumentPropertiesW", SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]

static extern int AdvancedDocumentProperties(IntPtr hwnd, IntPtr hPrinter, [MarshalAs(UnmanagedType.LPWStr)] string pDeviceName, IntPtr pDevModeOutput, IntPtr pDevModeInput);

Calling the Print() method will fire the Printjob.Starting event. In the event handler, call AdvancedDocumentProperties to display the printer setting dialog box. Select the appropriate setting that you would like to save to file and click OK. The file can be generated with individual settings or with a group of settings.

PrintJob printJob = new PrintJob(Printer.Default, "DocumentA.pdf");

printJob.Starting += new PrintJobStartingEventHandler(this.onStartingPrint1);

printJob.Print();

PrintJobStartingEventArgs contains following properties that will be used to retrieve the printer settings from the dialog box.

Name Type Definition
Devmode Intptr Pointer towards Devmode structure
DevmodeSize Int Size of  Devmode
DevmodeDriverExtra Int Size of  DmDriverExtra
PrintJob PrintJob DynamicPDF Printmanager PrintJob object. Generic printer settings can be changed using this object.

Here is the code for the event handler to retrieve and save the selected printer setting.

private void onStartingPrint1(object sender, PrintJobStartingEventArgs e)
{
    //Invoke the printer options dialog box.
    int value = AdvancedDocumentProperties(IntPtr.Zero, IntPtr.Zero, e.PrintJob.Printer.Name, e.DevMode, e.DevMode);

    //Create a byte array to store Devmode and DmDriverExtra settings.
    byte[] bytearray = new byte[e.DevModeSize + e.DevModeDriverExtra];

    //Copy the contents of both Devmode and DmDriverExtra to the byte array.
    Marshal.Copy(e.DevMode, bytearray, 0, e.DevModeSize + e.DevModeDriverExtra);

    //Save the settings to disk.
    File.WriteAllBytes("SettingsFile.bin", bytearray); 
}

Next, we will print a PDF using the saved settings by overwriting the Devmode and DmDriverExtra structures with the file contents. Due to this, all settings applied to the PrintJob object before Printjob.Starting event handler call will be lost. However we can set the print settings after overwriting Devmode and DmDriverExtra in the event handler.

private void onStartingPrint2(object sender, PrintJobStartingEventArgs e)
{
    //Load the saved settings into a byte array. 
    byte[] bytearray = File.ReadAllBytes("SettingsFile.bin");

    //Overwrite the DevMode with the byte array restored from file. 
    IntPtr pdevmode = Marshal.AllocHGlobal(bytearray.Length);
    Marshal.Copy(bytearray, 0, e.DevMode, bytearray.Length);

    //The line below displays the print options dialog box, so the modified settings can be verified during development. 
    //It is not required for printing so it can removed, especially for non-interactive applications like windows services             
    int value = AdvancedDocumentProperties(IntPtr.Zero, IntPtr.Zero, e.PrintJob.Printer.Name, e.DevMode, e.DevMode);            

    //Set additional print settings as needed. 
    e.PrintJob.PrintOptions.Copies = 1;
}

Complete source code is available for download below.

Downloads:

PrinterAdvancedOptions.zip (21.2 kb)

Tags: , , , , ,

Dynamic PDF for .NET Core Suite Version 8 Release

Mon, September 29 2014, 5:12 PM (US Eastern Time)

DynamicPDF Core Suite for .NET v8 has been released!  Thanks to everyone who participated in the beta testing and helped make this release a success.  Please review our full DynamicPDF Core Suite v8 Press Release.
 
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, Document Optimization (of Images), Enhanced Font Rendering, Field level Flattening as well as overall efficiency improvements and stabilizations. Take a look at our Version 8 Full Feature List.
 
For any upgrade options, existing customers can log into our Customer Area, or anyone can contact us directly, sales@cete.com or +1 410.772.8620.

Tags: , , , , , ,

DynamicPDF for .NET Core Suite Version 8 BETA Release

Wed, June 11 2014, 4:58 PM (US Eastern Time)

We have just posted the DynamicPDF Core Suite for .NET version 8 BETA on our site for download and testing, DynamicPDF Core Suite for .NET v8 Beta Download.

This version 8 BETA includes DynamicPDF Generator, Merger and ReportWriter (all included in the Core Suite) and the installer includes the updated documentation and all our C# and VB.NET Visual Studio examples.

Version 8 will include a bunch of new features including two new barcodes (MSI and RM4SCC), PDF/A-2 and PDF/A-3 support, duplicate image removal 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 8 BETA.

Tags: , , , , , , ,

Month List