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

by Robbie W 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

by Robbie W 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

by Robbie W 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: , , , , , , ,

DynamicPDF Viewer for .NET is Released

by Robbie W Wed, June 19 2013, 4:33 PM (US Eastern Time)

We are happy to announce the full production release of the DynamicPDF Viewer for .NET.  Viewer for .NET is our customizable .NET PDF viewer that can be embedded into any .NET windows form application.  It displays PDF files quick and efficiently and has no external dependencies.  If you need to add PDF displaying or viewing to your .NET application then you have got to try DynamicPDF Viewer for .NET.

We offer a fully functional evaluation edition that never expires so download and try it out today!

PDF Viewer for .NET

Tags: , , , ,

DynamicPDF PrintManager for .NET Version 2 BETA Release

by Anil S Mon, April 29 2013, 11:48 AM (US Eastern Time)

The BETA of DynamicPDF PrintManager Version 2.0 is now available for download here.

For any one new to this product, DynamicPDF PrintManager for .NET allows developers to automate PDF printing from within any .NET application (C# or VB.NET).

We have added some new features into Version 2 that include retrieving the list of media/paper types, setting the media/paper type for a print job and redirecting print output to a file.

Read more and begin beta testing today, http://www.dynamicpdf.com/Products/DynamicPDFPrintManagerforNET/Beta.aspx.

Any questions, comments or issues should be sent to support@cete.com.

Tags: , , ,

.NET PDF Viewer - Beta Release

by Robbie W Thu, March 7 2013, 4:41 PM (US Eastern Time)

Now ready for Beta testing is our DynamicPDF Viewer 1.0 for .NET windows control.  This is an all new PDF Viewer designed specifically for .NET developers who want to add seamless, efficient, customizable PDF viewing to their .NET windows application.

No COM Interops, no problem!  DynamicPDF Viewer for .NET is an actual .NET Windows Form Control.  The API is easy to use and the PDF Viewing window is easy to customize.

Display a PDF from a file or byte array, open encrypted PDF files, turn toolbars on or off and so much more.

Read more and begin beta testing today, http://www.dynamicpdf.com/Products/DynamicPDFViewerForNET/Beta.aspx.

Any questions, comments or issues should be sent to support@cete.com.

Thanks for everyone's participation.

Tags: , , , ,

Creating PDFs in C# with Outlined or Invisible Text

by Andy C 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
        writer.SetGraphicsMode();
        // Set Stroke Color and Border Width
        writer.SetStrokeColor(base.TextColor);
        writer.SetLineWidth(this.borderWidth);
        // Enter Text Mode
        writer.SetTextMode();
        // Set Text Rendering Mode
        writer.SetTextRenderingMode(TextRenderingMode.Stroke);
        // Call Draw on base class
        base.Draw(writer);
        // Enter Text Mode (in case underline is set to true)
        writer.SetTextMode();
        // Set Text Rendering Mode Back to Fill
        writer.SetTextRenderingMode(TextRenderingMode.Fill);
    }
}

More...

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

Create AES Encrypted PDFs in C# and VB .NET

by Andy C Tue, July 31 2012, 2:48 PM (US Eastern Time)

We recently released an update that introduces AES-256 bit and AES-128 bit encryption to our .NET PDF creation and merging library. We have offered encryption since 2002, but this was limited to RC4-40 bit and RC4-128 bit security until this release. We have also restructured the API a bit in order to easily accommodate new encryption methods in the future.

Encryption is now handled by 4 classes in a new ceTe.DynamicPDF.Cryptography namespace:

All security classes allow restrictions to be placed on a PDF to restrict printing, modification, copying content or updating/adding text annotations or form fields. The 128-bit and higher classes allow restrictions to be placed on a PDF to restrict filling in existing form fields, extracting text and graphics for accessibility purposes, modifying the pages included, high resolution printing or leaving the XMP metadata unencrypted. The AES classes also add the ability to encrypt only file attachments.

The C# code to add AES-256 bit encryption to a new document is very straight forward:

Document document = new Document();
Page page = new Page();
page.Elements.Add(new Label("AES-256 bit encrypted PDF.", 0, 0, 500, 15));
document.Pages.Add(page);
// Add the encryption
Aes256Security security = new Aes256Security("ownerpassword", "userpassword");
security.AllowHighResolutionPrinting = false;
// Set other encryption options
document.Security = security;
// Output the PDF
document.Draw("MyPDF.pdf");

More...

Tags: , , , ,