Pdftools SDK
Loading...
Searching...
No Matches
Macros | Typedefs | Functions
PdfTools_PdfToolsPdfAValidation.h File Reference
#include "PdfTools_Types.h"
#include "PdfTools_PdfToolsSys.h"

Go to the source code of this file.

Macros

#define PDFTOOLS_CALL
 
#define TPdfToolsPdfAValidation_Validator_Error   TPdfToolsPdfAValidation_Validator_ErrorA
 
#define PdfToolsPdfAValidation_Validator_AddErrorHandler   PdfToolsPdfAValidation_Validator_AddErrorHandlerA
 
#define PdfToolsPdfAValidation_Validator_RemoveErrorHandler   PdfToolsPdfAValidation_Validator_RemoveErrorHandlerA
 

Typedefs

typedef void(PDFTOOLS_CALLTPdfToolsPdfAValidation_Validator_ErrorA) (void *pContext, const char *szDataPart, const char *szMessage, TPdfToolsPdfAValidation_ErrorCategory iCategory, const char *szContext, int iPageNo, int iObjectNo)
 
typedef void(PDFTOOLS_CALLTPdfToolsPdfAValidation_Validator_ErrorW) (void *pContext, const WCHAR *szDataPart, const WCHAR *szMessage, TPdfToolsPdfAValidation_ErrorCategory iCategory, const WCHAR *szContext, int iPageNo, int iObjectNo)
 

Functions

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsPdfAValidation_Validator_AddErrorHandlerA (TPdfToolsPdfAValidation_Validator *pValidator, void *pContext, TPdfToolsPdfAValidation_Validator_ErrorA pFunction)
 Adds event handler.
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsPdfAValidation_Validator_AddErrorHandlerW (TPdfToolsPdfAValidation_Validator *pValidator, void *pContext, TPdfToolsPdfAValidation_Validator_ErrorW pFunction)
 Adds event handler.
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsPdfAValidation_Validator_RemoveErrorHandlerA (TPdfToolsPdfAValidation_Validator *pValidator, void *pContext, TPdfToolsPdfAValidation_Validator_ErrorA pFunction)
 Removes event handler.
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsPdfAValidation_Validator_RemoveErrorHandlerW (TPdfToolsPdfAValidation_Validator *pValidator, void *pContext, TPdfToolsPdfAValidation_Validator_ErrorW pFunction)
 Removes event handler.
 
PDFTOOLS_EXPORT TPdfToolsPdfAValidation_Validator *PDFTOOLS_CALL PdfToolsPdfAValidation_Validator_New (void)
 
PDFTOOLS_EXPORT TPdfToolsPdfAValidation_ValidationResult *PDFTOOLS_CALL PdfToolsPdfAValidation_Validator_Validate (TPdfToolsPdfAValidation_Validator *pValidator, TPdfToolsPdf_Document *pDocument, TPdfToolsPdfAValidation_ValidationOptions *pOptions)
 Validate the standards conformance of a PDF document.
 
PDFTOOLS_EXPORT TPdfToolsPdfAValidation_AnalysisResult *PDFTOOLS_CALL PdfToolsPdfAValidation_Validator_Analyze (TPdfToolsPdfAValidation_Validator *pValidator, TPdfToolsPdf_Document *pDocument, TPdfToolsPdfAValidation_AnalysisOptions *pOptions)
 Analyze a PDF document in preparation for its conversion to PDF/A. This method validates the document's standards conformance like PdfToolsPdfAValidation_Validator_Validate. In addition to that, certain additional checks can be performed. However, the main difference is that the analysis result can be used in PdfToolsPdfAConversion_Converter_Convert to convert the PDF document to PDF/A.
 
PDFTOOLS_EXPORT TPdfToolsPdfAValidation_ValidationOptions *PDFTOOLS_CALL PdfToolsPdfAValidation_ValidationOptions_New (void)
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsPdfAValidation_ValidationOptions_GetConformance (TPdfToolsPdfAValidation_ValidationOptions *pValidationOptions, TPdfToolsPdf_Conformance *pConformance)
 The conformance to be validated.
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsPdfAValidation_ValidationOptions_SetConformance (TPdfToolsPdfAValidation_ValidationOptions *pValidationOptions, const TPdfToolsPdf_Conformance *pConformance)
 The conformance to be validated.
 
PDFTOOLS_EXPORT TPdfToolsPdf_Conformance PDFTOOLS_CALL PdfToolsPdfAValidation_ValidationResult_GetConformance (TPdfToolsPdfAValidation_ValidationResult *pValidationResult)
 The validated conformance.
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsPdfAValidation_ValidationResult_IsConforming (TPdfToolsPdfAValidation_ValidationResult *pValidationResult)
 Whether the document is conforming Whether the document conforms to all standards referenced to the PdfToolsPdfAValidation_ValidationResult_GetConformance. Any issues found are reported as TPdfToolsPdfAValidation_Validator_Error.
 
PDFTOOLS_EXPORT TPdfToolsPdfAValidation_AnalysisOptions *PDFTOOLS_CALL PdfToolsPdfAValidation_AnalysisOptions_New (void)
 
PDFTOOLS_EXPORT TPdfToolsPdf_Conformance PDFTOOLS_CALL PdfToolsPdfAValidation_AnalysisOptions_GetConformance (TPdfToolsPdfAValidation_AnalysisOptions *pAnalysisOptions)
 The PDF/A conformance to validate.
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsPdfAValidation_AnalysisOptions_SetConformance (TPdfToolsPdfAValidation_AnalysisOptions *pAnalysisOptions, TPdfToolsPdf_Conformance iConformance)
 The PDF/A conformance to validate.
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsPdfAValidation_AnalysisOptions_GetStrictMode (TPdfToolsPdfAValidation_AnalysisOptions *pAnalysisOptions)
 Whether to enable additional, strict validation checks.
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsPdfAValidation_AnalysisOptions_SetStrictMode (TPdfToolsPdfAValidation_AnalysisOptions *pAnalysisOptions, BOOL bStrictMode)
 Whether to enable additional, strict validation checks.
 
PDFTOOLS_EXPORT TPdfToolsPdf_Conformance PDFTOOLS_CALL PdfToolsPdfAValidation_AnalysisResult_GetConformance (TPdfToolsPdfAValidation_AnalysisResult *pAnalysisResult)
 The conformance used for analysis.
 
PDFTOOLS_EXPORT TPdfToolsPdf_Conformance PDFTOOLS_CALL PdfToolsPdfAValidation_AnalysisResult_GetRecommendedConformance (TPdfToolsPdfAValidation_AnalysisResult *pAnalysisResult)
 The recommended conversion conformance The optimal PDF/A conformance for the conversion (i.e. the PdfToolsPdfAConversion_ConversionOptions_GetConformance). The recommended conformance level might be higher than the analysis conformance, if the document actually contains all data required for the higher level. It might also be lower, if the document is missing some required data.
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsPdfAValidation_AnalysisResult_IsConversionRecommended (TPdfToolsPdfAValidation_AnalysisResult *pAnalysisResult)
 Whether the document should be converted to PDF/A.
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsPdfAValidation_AnalysisResult_IsConforming (TPdfToolsPdfAValidation_AnalysisResult *pAnalysisResult)
 Whether the document is conforming Whether the document conforms to the PdfToolsPdfAValidation_AnalysisResult_GetConformance. Note that even if this property returns TRUE a conversion might still be recommended as indicated by PdfToolsPdfAValidation_AnalysisResult_IsConversionRecommended.
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsPdfAValidation_AnalysisResult_IsSigned (TPdfToolsPdfAValidation_AnalysisResult *pAnalysisResult)
 Whether the document is digitally signed.
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsPdfAValidation_AnalysisResult_GetHasEmbeddedFiles (TPdfToolsPdfAValidation_AnalysisResult *pAnalysisResult)
 Whether the document contains embedded files.
 
PDFTOOLS_EXPORT int PDFTOOLS_CALL PdfToolsPdfAValidation_AnalysisResult_GetFontCount (TPdfToolsPdfAValidation_AnalysisResult *pAnalysisResult)
 The number of fonts used in the document.
 

Macro Definition Documentation

◆ PDFTOOLS_CALL

#define PDFTOOLS_CALL

◆ PdfToolsPdfAValidation_Validator_AddErrorHandler

#define PdfToolsPdfAValidation_Validator_AddErrorHandler   PdfToolsPdfAValidation_Validator_AddErrorHandlerA

◆ PdfToolsPdfAValidation_Validator_RemoveErrorHandler

#define PdfToolsPdfAValidation_Validator_RemoveErrorHandler   PdfToolsPdfAValidation_Validator_RemoveErrorHandlerA

◆ TPdfToolsPdfAValidation_Validator_Error

#define TPdfToolsPdfAValidation_Validator_Error   TPdfToolsPdfAValidation_Validator_ErrorA

Typedef Documentation

◆ TPdfToolsPdfAValidation_Validator_ErrorA

typedef void(PDFTOOLS_CALL * TPdfToolsPdfAValidation_Validator_ErrorA) (void *pContext, const char *szDataPart, const char *szMessage, TPdfToolsPdfAValidation_ErrorCategory iCategory, const char *szContext, int iPageNo, int iObjectNo)

Report a validation issue found in PdfToolsPdfAValidation_Validator_Analyze or PdfToolsPdfAValidation_Validator_Validate.

Parameters
[in,out]pContextContext of the event callback.
[in]szDataPartThe data part is NULL for the main file and a data part specification for embedded files. Examples:
  • embedded-file:file.pdf: For a file file.pdf that is embedded in the main file.
  • embedded-file:file1.pdf/embedded-file:file2.pdf: For a file file2.pdf that is embedded in an embedded file file1.pdf.
[in]szMessageThe validation message
[in]iCategoryThe category of the validation error
[in]szContextA description of the context where the error occurred
[in]iPageNoThe page number this error is associated to or 0
[in]iObjectNoThe number of the PDF object this error is associated to

◆ TPdfToolsPdfAValidation_Validator_ErrorW

typedef void(PDFTOOLS_CALL * TPdfToolsPdfAValidation_Validator_ErrorW) (void *pContext, const WCHAR *szDataPart, const WCHAR *szMessage, TPdfToolsPdfAValidation_ErrorCategory iCategory, const WCHAR *szContext, int iPageNo, int iObjectNo)

Report a validation issue found in PdfToolsPdfAValidation_Validator_Analyze or PdfToolsPdfAValidation_Validator_Validate.

Parameters
[in,out]pContextContext of the event callback.
[in]szDataPartThe data part is NULL for the main file and a data part specification for embedded files. Examples:
  • embedded-file:file.pdf: For a file file.pdf that is embedded in the main file.
  • embedded-file:file1.pdf/embedded-file:file2.pdf: For a file file2.pdf that is embedded in an embedded file file1.pdf.
[in]szMessageThe validation message
[in]iCategoryThe category of the validation error
[in]szContextA description of the context where the error occurred
[in]iPageNoThe page number this error is associated to or 0
[in]iObjectNoThe number of the PDF object this error is associated to

Function Documentation

◆ PdfToolsPdfAValidation_AnalysisOptions_GetConformance()

PDFTOOLS_EXPORT TPdfToolsPdf_Conformance PDFTOOLS_CALL PdfToolsPdfAValidation_AnalysisOptions_GetConformance ( TPdfToolsPdfAValidation_AnalysisOptions * pAnalysisOptions)

The PDF/A conformance to validate.

It is recommended to use:

Default: "PDF/A-2b"

Parameters
[in,out]pAnalysisOptionsActs as a handle to the native object of type TPdfToolsPdfAValidation_AnalysisOptions.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when 0 is returned. The specific error code can be retrieved by calling PdfTools_GetLastError. The error message can be obtained by calling PdfTools_GetLastErrorMessage.

◆ PdfToolsPdfAValidation_AnalysisOptions_GetStrictMode()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsPdfAValidation_AnalysisOptions_GetStrictMode ( TPdfToolsPdfAValidation_AnalysisOptions * pAnalysisOptions)

Whether to enable additional, strict validation checks.

Whether to check for potential issues that are corner cases of the PDF/A ISO Standard in which a conversion is strongly advised. Also see the documentation of PdfToolsPdfAValidation_AnalysisResult_IsConversionRecommended.

Default: TRUE

Parameters
[in,out]pAnalysisOptionsActs as a handle to the native object of type TPdfToolsPdfAValidation_AnalysisOptions.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when FALSE is returned and the error code returned by PdfTools_GetLastError is different from ePdfTools_Error_Success. The error message can be obtained by calling PdfTools_GetLastErrorMessage.

◆ PdfToolsPdfAValidation_AnalysisOptions_New()

PDFTOOLS_EXPORT TPdfToolsPdfAValidation_AnalysisOptions *PDFTOOLS_CALL PdfToolsPdfAValidation_AnalysisOptions_New ( void )
Returns
Handle to the newly created native object.

NULL if there is an error.

Note
An error occurred when NULL is returned. The specific error code can be retrieved by calling PdfTools_GetLastError. The error message can be obtained by calling PdfTools_GetLastErrorMessage.

◆ PdfToolsPdfAValidation_AnalysisOptions_SetConformance()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsPdfAValidation_AnalysisOptions_SetConformance ( TPdfToolsPdfAValidation_AnalysisOptions * pAnalysisOptions,
TPdfToolsPdf_Conformance iConformance )

The PDF/A conformance to validate.

It is recommended to use:

Default: "PDF/A-2b"

Parameters
[in,out]pAnalysisOptionsActs as a handle to the native object of type TPdfToolsPdfAValidation_AnalysisOptions.
[in]iConformanceSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE is returned. The specific error code can be retrieved by calling PdfTools_GetLastError. The error message can be obtained by calling PdfTools_GetLastErrorMessage.

◆ PdfToolsPdfAValidation_AnalysisOptions_SetStrictMode()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsPdfAValidation_AnalysisOptions_SetStrictMode ( TPdfToolsPdfAValidation_AnalysisOptions * pAnalysisOptions,
BOOL bStrictMode )

Whether to enable additional, strict validation checks.

Whether to check for potential issues that are corner cases of the PDF/A ISO Standard in which a conversion is strongly advised. Also see the documentation of PdfToolsPdfAValidation_AnalysisResult_IsConversionRecommended.

Default: TRUE

Parameters
[in,out]pAnalysisOptionsActs as a handle to the native object of type TPdfToolsPdfAValidation_AnalysisOptions.
[in]bStrictModeSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE is returned. The specific error code can be retrieved by calling PdfTools_GetLastError. The error message can be obtained by calling PdfTools_GetLastErrorMessage.

◆ PdfToolsPdfAValidation_AnalysisResult_GetConformance()

PDFTOOLS_EXPORT TPdfToolsPdf_Conformance PDFTOOLS_CALL PdfToolsPdfAValidation_AnalysisResult_GetConformance ( TPdfToolsPdfAValidation_AnalysisResult * pAnalysisResult)

The conformance used for analysis.

The PDF/A level might differ from the PdfToolsPdfAValidation_AnalysisOptions_GetConformance. If the claimed PDF/A level of the input document is higher than PdfToolsPdfAValidation_AnalysisOptions_GetConformance, the higher level is used for PdfToolsPdfAValidation_AnalysisResult_GetConformance.

For example, if PdfToolsPdfAValidation_AnalysisOptions_GetConformance is PDF/A-2b, but the document's claimed conformance is PDF/A-2u, the analysis checks if the document actually conforms to its claimed conformance PDF/A-2u. Because otherwise a conversion is required.

Parameters
[in,out]pAnalysisResultActs as a handle to the native object of type TPdfToolsPdfAValidation_AnalysisResult.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when 0 is returned. The specific error code can be retrieved by calling PdfTools_GetLastError. The error message can be obtained by calling PdfTools_GetLastErrorMessage.

◆ PdfToolsPdfAValidation_AnalysisResult_GetFontCount()

PDFTOOLS_EXPORT int PDFTOOLS_CALL PdfToolsPdfAValidation_AnalysisResult_GetFontCount ( TPdfToolsPdfAValidation_AnalysisResult * pAnalysisResult)

The number of fonts used in the document.

Parameters
[in,out]pAnalysisResultActs as a handle to the native object of type TPdfToolsPdfAValidation_AnalysisResult.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when -1 is returned. The specific error code can be retrieved by calling PdfTools_GetLastError. The error message can be obtained by calling PdfTools_GetLastErrorMessage.

◆ PdfToolsPdfAValidation_AnalysisResult_GetHasEmbeddedFiles()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsPdfAValidation_AnalysisResult_GetHasEmbeddedFiles ( TPdfToolsPdfAValidation_AnalysisResult * pAnalysisResult)

Whether the document contains embedded files.

Parameters
[in,out]pAnalysisResultActs as a handle to the native object of type TPdfToolsPdfAValidation_AnalysisResult.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when FALSE is returned and the error code returned by PdfTools_GetLastError is different from ePdfTools_Error_Success. The error message can be obtained by calling PdfTools_GetLastErrorMessage.

◆ PdfToolsPdfAValidation_AnalysisResult_GetRecommendedConformance()

PDFTOOLS_EXPORT TPdfToolsPdf_Conformance PDFTOOLS_CALL PdfToolsPdfAValidation_AnalysisResult_GetRecommendedConformance ( TPdfToolsPdfAValidation_AnalysisResult * pAnalysisResult)

The recommended conversion conformance The optimal PDF/A conformance for the conversion (i.e. the PdfToolsPdfAConversion_ConversionOptions_GetConformance). The recommended conformance level might be higher than the analysis conformance, if the document actually contains all data required for the higher level. It might also be lower, if the document is missing some required data.

Parameters
[in,out]pAnalysisResultActs as a handle to the native object of type TPdfToolsPdfAValidation_AnalysisResult.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when 0 is returned. The specific error code can be retrieved by calling PdfTools_GetLastError. The error message can be obtained by calling PdfTools_GetLastErrorMessage.

◆ PdfToolsPdfAValidation_AnalysisResult_IsConforming()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsPdfAValidation_AnalysisResult_IsConforming ( TPdfToolsPdfAValidation_AnalysisResult * pAnalysisResult)

Whether the document is conforming Whether the document conforms to the PdfToolsPdfAValidation_AnalysisResult_GetConformance. Note that even if this property returns TRUE a conversion might still be recommended as indicated by PdfToolsPdfAValidation_AnalysisResult_IsConversionRecommended.

Parameters
[in,out]pAnalysisResultActs as a handle to the native object of type TPdfToolsPdfAValidation_AnalysisResult.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when FALSE is returned and the error code returned by PdfTools_GetLastError is different from ePdfTools_Error_Success. The error message can be obtained by calling PdfTools_GetLastErrorMessage.

◆ PdfToolsPdfAValidation_AnalysisResult_IsConversionRecommended()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsPdfAValidation_AnalysisResult_IsConversionRecommended ( TPdfToolsPdfAValidation_AnalysisResult * pAnalysisResult)

Whether the document should be converted to PDF/A.

A conversion is generally recommended in the following cases:

Note that in certain processes it might also be beneficial to convert a document if its conformance does not match the PdfToolsPdfAValidation_AnalysisResult_GetRecommendedConformance. This will actually upgrade the PDF/A level of the input document.

Parameters
[in,out]pAnalysisResultActs as a handle to the native object of type TPdfToolsPdfAValidation_AnalysisResult.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when FALSE is returned and the error code returned by PdfTools_GetLastError is different from ePdfTools_Error_Success. The error message can be obtained by calling PdfTools_GetLastErrorMessage.

◆ PdfToolsPdfAValidation_AnalysisResult_IsSigned()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsPdfAValidation_AnalysisResult_IsSigned ( TPdfToolsPdfAValidation_AnalysisResult * pAnalysisResult)

Whether the document is digitally signed.

Parameters
[in,out]pAnalysisResultActs as a handle to the native object of type TPdfToolsPdfAValidation_AnalysisResult.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when FALSE is returned and the error code returned by PdfTools_GetLastError is different from ePdfTools_Error_Success. The error message can be obtained by calling PdfTools_GetLastErrorMessage.

◆ PdfToolsPdfAValidation_ValidationOptions_GetConformance()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsPdfAValidation_ValidationOptions_GetConformance ( TPdfToolsPdfAValidation_ValidationOptions * pValidationOptions,
TPdfToolsPdf_Conformance * pConformance )

The conformance to be validated.

The required conformance or NULL to validate the document's claimed conformance, i.e. PdfToolsPdf_Document_GetConformance.

The PDF validation verifies if the input document conforms to all standards associated with this conformance.

Note that it is generally only meaningful to validate the claimed conformance of a document.

Default value: NULL, i.e. validate the document's claimed conformance.

Parameters
[in,out]pValidationOptionsActs as a handle to the native object of type TPdfToolsPdfAValidation_ValidationOptions.
[out]pConformanceRetrieved value.
Returns
FALSE if either an error occurred or the [out] argument returns NULL. To determine if an error has occurred, check the error code as described in the note section below.
Note
An error occurred when FALSE is returned and the error code returned by PdfTools_GetLastError is different from ePdfTools_Error_Success. The error message can be obtained by calling PdfTools_GetLastErrorMessage.

◆ PdfToolsPdfAValidation_ValidationOptions_New()

PDFTOOLS_EXPORT TPdfToolsPdfAValidation_ValidationOptions *PDFTOOLS_CALL PdfToolsPdfAValidation_ValidationOptions_New ( void )
Returns
Handle to the newly created native object.

NULL if there is an error.

Note
An error occurred when NULL is returned. The specific error code can be retrieved by calling PdfTools_GetLastError. The error message can be obtained by calling PdfTools_GetLastErrorMessage.

◆ PdfToolsPdfAValidation_ValidationOptions_SetConformance()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsPdfAValidation_ValidationOptions_SetConformance ( TPdfToolsPdfAValidation_ValidationOptions * pValidationOptions,
const TPdfToolsPdf_Conformance * pConformance )

The conformance to be validated.

The required conformance or NULL to validate the document's claimed conformance, i.e. PdfToolsPdf_Document_GetConformance.

The PDF validation verifies if the input document conforms to all standards associated with this conformance.

Note that it is generally only meaningful to validate the claimed conformance of a document.

Default value: NULL, i.e. validate the document's claimed conformance.

Parameters
[in,out]pValidationOptionsActs as a handle to the native object of type TPdfToolsPdfAValidation_ValidationOptions.
[in]pConformanceSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE is returned. The specific error code can be retrieved by calling PdfTools_GetLastError. The error message can be obtained by calling PdfTools_GetLastErrorMessage.

◆ PdfToolsPdfAValidation_ValidationResult_GetConformance()

PDFTOOLS_EXPORT TPdfToolsPdf_Conformance PDFTOOLS_CALL PdfToolsPdfAValidation_ValidationResult_GetConformance ( TPdfToolsPdfAValidation_ValidationResult * pValidationResult)

The validated conformance.

Parameters
[in,out]pValidationResultActs as a handle to the native object of type TPdfToolsPdfAValidation_ValidationResult.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when 0 is returned. The specific error code can be retrieved by calling PdfTools_GetLastError. The error message can be obtained by calling PdfTools_GetLastErrorMessage.

◆ PdfToolsPdfAValidation_ValidationResult_IsConforming()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsPdfAValidation_ValidationResult_IsConforming ( TPdfToolsPdfAValidation_ValidationResult * pValidationResult)

Whether the document is conforming Whether the document conforms to all standards referenced to the PdfToolsPdfAValidation_ValidationResult_GetConformance. Any issues found are reported as TPdfToolsPdfAValidation_Validator_Error.

Parameters
[in,out]pValidationResultActs as a handle to the native object of type TPdfToolsPdfAValidation_ValidationResult.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when FALSE is returned and the error code returned by PdfTools_GetLastError is different from ePdfTools_Error_Success. The error message can be obtained by calling PdfTools_GetLastErrorMessage.

◆ PdfToolsPdfAValidation_Validator_AddErrorHandlerA()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsPdfAValidation_Validator_AddErrorHandlerA ( TPdfToolsPdfAValidation_Validator * pValidator,
void * pContext,
TPdfToolsPdfAValidation_Validator_ErrorA pFunction )

Adds event handler.

Parameters
[in,out]pValidatorPointer to the object to which the event handler is added.
[in,out]pContextThe context of the event handler.
[in]pFunctionThe event callback that is added.
Returns
TRUE if adding event handler was successful; FALSE if error occured.
Note
In case of an error, the specific error code can be retrieved by calling PdfTools_GetLastError. The error message can be obtained by calling PdfTools_GetLastErrorMessage.

◆ PdfToolsPdfAValidation_Validator_AddErrorHandlerW()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsPdfAValidation_Validator_AddErrorHandlerW ( TPdfToolsPdfAValidation_Validator * pValidator,
void * pContext,
TPdfToolsPdfAValidation_Validator_ErrorW pFunction )

Adds event handler.

Parameters
[in,out]pValidatorPointer to the object to which the event handler is added.
[in,out]pContextThe context of the event handler.
[in]pFunctionThe event callback that is added.
Returns
TRUE if adding event handler was successful; FALSE if error occured.
Note
In case of an error, the specific error code can be retrieved by calling PdfTools_GetLastError. The error message can be obtained by calling PdfTools_GetLastErrorMessage.

◆ PdfToolsPdfAValidation_Validator_Analyze()

Analyze a PDF document in preparation for its conversion to PDF/A. This method validates the document's standards conformance like PdfToolsPdfAValidation_Validator_Validate. In addition to that, certain additional checks can be performed. However, the main difference is that the analysis result can be used in PdfToolsPdfAConversion_Converter_Convert to convert the PDF document to PDF/A.

Parameters
[in,out]pValidatorActs as a handle to the native object of type TPdfToolsPdfAValidation_Validator.
[in,out]pDocumentThe document to analyze
[in,out]pOptionsThe options or NULL for default analysis options
Returns
The result of the analysis

NULL if there is an error.

Note
An error occurred when NULL is returned. The specific error code can be retrieved by calling PdfTools_GetLastError. The error message can be obtained by calling PdfTools_GetLastErrorMessage. Possible error codes:

◆ PdfToolsPdfAValidation_Validator_New()

PDFTOOLS_EXPORT TPdfToolsPdfAValidation_Validator *PDFTOOLS_CALL PdfToolsPdfAValidation_Validator_New ( void )
Returns
Handle to the newly created native object.

NULL if there is an error.

Note
An error occurred when NULL is returned. The specific error code can be retrieved by calling PdfTools_GetLastError. The error message can be obtained by calling PdfTools_GetLastErrorMessage.

◆ PdfToolsPdfAValidation_Validator_RemoveErrorHandlerA()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsPdfAValidation_Validator_RemoveErrorHandlerA ( TPdfToolsPdfAValidation_Validator * pValidator,
void * pContext,
TPdfToolsPdfAValidation_Validator_ErrorA pFunction )

Removes event handler.

Parameters
[in,out]pValidatorPointer to the object from which the event handler is removed.
[in,out]pContextThe context of the event handler.
[in]pFunctionThe event callback that is removed.
Returns
TRUE if removal was successful; FALSE if error occured.
Note
In case of an error, the specific error code can be retrieved by calling PdfTools_GetLastError. The error message can be obtained by calling PdfTools_GetLastErrorMessage.

◆ PdfToolsPdfAValidation_Validator_RemoveErrorHandlerW()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsPdfAValidation_Validator_RemoveErrorHandlerW ( TPdfToolsPdfAValidation_Validator * pValidator,
void * pContext,
TPdfToolsPdfAValidation_Validator_ErrorW pFunction )

Removes event handler.

Parameters
[in,out]pValidatorPointer to the object from which the event handler is removed.
[in,out]pContextThe context of the event handler.
[in]pFunctionThe event callback that is removed.
Returns
TRUE if removal was successful; FALSE if error occured.
Note
In case of an error, the specific error code can be retrieved by calling PdfTools_GetLastError. The error message can be obtained by calling PdfTools_GetLastErrorMessage.

◆ PdfToolsPdfAValidation_Validator_Validate()

Validate the standards conformance of a PDF document.

Parameters
[in,out]pValidatorActs as a handle to the native object of type TPdfToolsPdfAValidation_Validator.
[in,out]pDocumentThe document to check the quality of
[in,out]pOptionsThe options or NULL for default validation options
Returns
The result of the validation

NULL if there is an error.

Note
An error occurred when NULL is returned. The specific error code can be retrieved by calling PdfTools_GetLastError. The error message can be obtained by calling PdfTools_GetLastErrorMessage. Possible error codes: