iText 9.1.0 API
iText.Kernel.Pdf.VersionConforming Class Reference

Static Public Member Functions

static bool  ValidatePdfVersionForDictEntry (PdfDocument document, PdfVersion expectedVersion, PdfName entryKey, PdfName dictType)
 
static bool  ValidatePdfVersionForDeprecatedFeatureLogWarn (PdfDocument document, PdfVersion expectedVersion, String deprecatedFeatureLogMessage)
 
static bool  ValidatePdfVersionForDeprecatedFeatureLogError (PdfDocument document, PdfVersion expectedVersion, String deprecatedFeatureLogMessage)
 
static bool  ValidatePdfVersionForNotSupportedFeatureLogError (PdfDocument document, PdfVersion expectedStartVersion, String notSupportedFeatureLogMessage)
  Logs error message in case provided PDF document version is earlier than specified expected starting version. More...
 

Static Public Attributes

const String  DEPRECATED_AES256_REVISION = "It seems that PDF 1.7 document encrypted with AES256 was updated to PDF 2.0 version and StampingProperties#preserveEncryption flag was set: encryption shall be updated via WriterProperties#setStandardEncryption method. Standard security handler was found with revision 5, which is deprecated and shall not be used in PDF 2.0 documents."
 
const String  DEPRECATED_ENCRYPTION_ALGORITHMS = "Encryption algorithms STANDARD_ENCRYPTION_40, STANDARD_ENCRYPTION_128 and ENCRYPTION_AES_128 (see com.itextpdf.kernel.pdf.EncryptionConstants) are deprecated in PDF 2.0. It is highly recommended not to use it."
 
const String  DEPRECATED_NEED_APPEARANCES_IN_ACROFORM = "NeedAppearances has been deprecated in PDF 2.0. Appearance streams are required in PDF 2.0."
 
const String  DEPRECATED_XFA_FORMS = "XFA is deprecated in PDF 2.0. The XFA form will not be written to the document"
 
const String  NOT_SUPPORTED_AES_GCM = "Advanced Encryption Standard-Galois/Counter Mode " + "(AES-GCM) encryption algorithm is supported starting from PDF 2.0."
 

Member Function Documentation

◆ ValidatePdfVersionForNotSupportedFeatureLogError()

static bool iText.Kernel.Pdf.VersionConforming.ValidatePdfVersionForNotSupportedFeatureLogError ( PdfDocument  document,
PdfVersion  expectedStartVersion,
String  notSupportedFeatureLogMessage 
)
inlinestatic

Logs error message in case provided PDF document version is earlier than specified expected starting version.

Parameters
document PDF document to check version for
expectedStartVersion starting version since which new feature is supported
notSupportedFeatureLogMessage error message to log
Returns
boolean value specifying whether validation passed ( true ) or failed ( false )