[SerializableAttribute()]
public enum PDFCompatibilityLevel
public final class PDFCompatibilityLevel
extends java.lang.Enum<PDFCompatibilityLevel>
[SerializableAttribute()]
public enum class PDFCompatibilityLevel
class PDFCompatibilityLevel(Enum):
Default = 0
PDF12 = 1
PDF13 = 2
PDF14 = 3
PDFA = 4
PDF15 = 5
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.
using Leadtools.WinForms;
using Leadtools;
using Leadtools.Codecs;
using Leadtools.Controls;
using Leadtools.Drawing;
using Leadtools.ImageProcessing;
using Leadtools.Pdf;
using Leadtools.Svg;
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 file
PDFFileType 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, convert
Console.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:\LEADTOOLS22\Resources\Images";
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document