Determines which compatibility (or version) level to use when creating or updating PDF files.
[SerializableAttribute()]public enum PDFCompatibilityLevel
<SerializableAttribute()>Public Enum PDFCompatibilityLevel
[SerializableAttribute()]public enum class PDFCompatibilityLevel
Members
| Value | Member | Description |
|---|---|---|
| 0 | Default | Default (PDF version 1.5) |
| 1 | PDF12 | PDF version 1.2 |
| 2 | PDF13 | PDF version 1.3 |
| 3 | PDF14 | PDF version 1.4 |
| 4 | PDFA | PDF/A |
| 5 | PDF15 | PDF version 1.5 |
The PDFCompatibilityLevel enumeration is used by the PDFFile.CompatibilityLevel property and is used to determine which compatibility (or version) level to use when creating or updating PDF files.
The following methods of the PDFFile class will use PDFFile.CompatibilityLevel when creating new or updating existing PDF files:
This example will check the version of a PDF file and convert it to PDF 1.4 if required.
Imports LeadtoolsImports Leadtools.CodecsImports Leadtools.PdfImports Leadtools.WinFormsImports Leadtools.SvgImports Leadtools.ImageProcessingPublic Sub PDFCompatibilityLevelExample()Dim sourceFileName As String = Path.Combine(LEAD_VARS.ImagesDir, "Leadtools.pdf")Dim destFileName As String = Path.Combine(LEAD_VARS.ImagesDir, "LEAD_14.pdf")' Check the version of the source fileDim fileType As PDFFileType = PDFFile.GetPDFFileType(sourceFileName, True)If fileType = PDFFileType.Unknown ThenConsole.WriteLine("Not a valid PDF file")ReturnEnd IfIf fileType = PDFFileType.PDF14 ThenConsole.WriteLine("Is PDF 1.4 already")ReturnEnd If' Not PDF 1.4, convertConsole.WriteLine("Converting to PDF 1.4")Dim file As PDFFile = New PDFFile(sourceFileName)file.CompatibilityLevel = PDFCompatibilityLevel.PDF14file.Convert(1, -1, destFileName)End SubPublic NotInheritable Class LEAD_VARSPublic Const ImagesDir As String = "C:\Users\Public\Documents\LEADTOOLS Images"End Class
using Leadtools;using Leadtools.Codecs;using Leadtools.Controls;using Leadtools.Drawing;using Leadtools.ImageProcessing;using Leadtools.Pdf;using Leadtools.Svg;using Leadtools.WinForms;public void PDFCompatibilityLevelExample(){string sourceFileName = Path.Combine(LEAD_VARS.ImagesDir, @"Leadtools.pdf");string destFileName = Path.Combine(LEAD_VARS.ImagesDir, @"LEAD_14.pdf");// Check the version of the source filePDFFileType fileType = PDFFile.GetPDFFileType(sourceFileName, true);if (fileType == PDFFileType.Unknown){Console.WriteLine("Not a valid PDF file");return;}if (fileType == PDFFileType.PDF14){Console.WriteLine("Is PDF 1.4 already");return;}// Not PDF 1.4, convertConsole.WriteLine("Converting to PDF 1.4");PDFFile file = new PDFFile(sourceFileName);file.CompatibilityLevel = PDFCompatibilityLevel.PDF14;file.Convert(1, -1, destFileName);}static class LEAD_VARS{public const string ImagesDir = @"C:\Users\Public\Documents\LEADTOOLS Images";}
|
Products |
Support |
Feedback: PDFCompatibilityLevel Enumeration - Leadtools.Pdf |
Introduction |
Help Version 19.0.2017.3.22
|

Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.