PDFOne .NET
Powerful all-in-one PDF library for .NET
Compatibility
VS 2005/2008/2010/2012/2013

How to Convert a PDF Document to an Older or Newer Version

To facilitate backward and forward compatibility, PDFOne .NET allows you to convert existing PDF documents to another PDF version.
By Raju Sinha

While PDF has seen several versions over the years, full application support for all the version may not be possible. A PDF viewer application built when PDF 1.4 (Adobe® Acrobat® 5.x) was the latest on the market may not render a document based on PDF 1.6 with equal ease.

To provide support for older applications, PDFOne .NET allows you to create PDF documents in several versions - PDF 1.4 (Adobe Acrobat 5.x) , PDF 1.5 (Adobe Acrobat 6.x), and PDF 1.6 (Adobe Acrobat 7.x). This means that you can load a PDF document then upgrade to a newer version or downgrade to an older version - providing both backward and forward compatibility.

In this article, we will see code snippets that illustrate the ease with which you can change the PDF version of a document.

The first code snippet shows how to convert a document from PDF 1.4 to PDF 1.6.

// Create a PDF document object
PDFDocument doc = new PDFDocument();

// Load an old-version PDF document
doc.Load("old_doc_1_4.pdf");

// Specify PDF version for document
doc.Version = PDFVersion.V1_6; // Set to an enumeration value

doc.OpenAfterCreate = true;

// Save the document in a newer version
doc.Save("new_doc_1_6.pdf");

doc.Close();

As you can see, to change the version of a PDF document, you need to load the document and then set the property PDFDocument.Version to a relevant PDFVersion enumeration value. When you call the method PDFDocument.Save(), PDFOne .NET does all the work of creating PDF content that is compatible with the version you have specified.

In the next code snippet, we convert a document from PDF 1.6 to PDF 1.5.

// Create a PDF document object
PDFDocument doc = new PDFDocument();

// Load a new-version PDF document
doc.Load("old_doc_1_6.pdf");

// Specify PDF version for document
doc.Version = PDFVersion.V1_5; // Set to an enumeration value

doc.OpenAfterCreate = true;

// Save the document to a newer version
doc.Save("new_doc_1_5.PDF");

doc.Close();

---o0O0o---

Our Delphi/C++Builder developer tools
XtremeDocumentStudio Delphi

Multi-format document-processing component suite for Delphi/C++Builder developers, covering both VCL and FireMonkey platforms.

eDocEngine VCL

A Delphi/C++Builder component suite for creating documents in over 20 formats and also export reports from popular Delphi reporting tools.

PDFtoolkit VCL

A Delphi/C++Builder component suite to edit, enhance, view, print, merge, split, encrypt, annotate, and bookmark PDF documents.

Our .NET Developer Tools
XtremeDocumentStudio .NET

Multi-format document-processing component suite for .NET developers.

PDFOne .NET

A .NET PDF component suite to create, edit, view, print, reorganize, encrypt, annotate, and bookmark PDF documents in .NET applications.

Our Java developer tools
XtremeDocumentStudio (for Java)

Multi-format document-processing component suite for Java developers.

PDFOne (for Java)

A Java PDF component suite to create, edit, view, print, reorganize, encrypt, annotate, bookmark PDF documents in Java applications.

Privacy | Legal | Feedback | Newsletter | Blog | Resellers © 2002-2016 Gnostice Information Technologies Private Limited. All rights reserved.