|
typedef void(PDFTOOLS_CALL * | TPdfToolsPdfAConversion_Converter_ConversionEventA) (void *pContext, const char *szDataPart, const char *szMessage, TPdfToolsPdfAConversion_EventSeverity iSeverity, TPdfToolsPdfAConversion_EventCategory iCategory, TPdfToolsPdfAConversion_EventCode iCode, const char *szContext, int iPageNo) |
| The event for errors, warnings, and informational messages that occur during conversion.
|
|
typedef void(PDFTOOLS_CALL * | TPdfToolsPdfAConversion_Converter_ConversionEventW) (void *pContext, const WCHAR *szDataPart, const WCHAR *szMessage, TPdfToolsPdfAConversion_EventSeverity iSeverity, TPdfToolsPdfAConversion_EventCategory iCategory, TPdfToolsPdfAConversion_EventCode iCode, const WCHAR *szContext, int iPageNo) |
| The event for errors, warnings, and informational messages that occur during conversion.
|
|
|
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfToolsPdfAConversion_Converter_AddConversionEventHandlerA (TPdfToolsPdfAConversion_Converter *pConverter, void *pContext, TPdfToolsPdfAConversion_Converter_ConversionEventA pFunction) |
| Adds event handler.
|
|
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfToolsPdfAConversion_Converter_AddConversionEventHandlerW (TPdfToolsPdfAConversion_Converter *pConverter, void *pContext, TPdfToolsPdfAConversion_Converter_ConversionEventW pFunction) |
| Adds event handler.
|
|
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfToolsPdfAConversion_Converter_RemoveConversionEventHandlerA (TPdfToolsPdfAConversion_Converter *pConverter, void *pContext, TPdfToolsPdfAConversion_Converter_ConversionEventA pFunction) |
| Removes event handler.
|
|
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfToolsPdfAConversion_Converter_RemoveConversionEventHandlerW (TPdfToolsPdfAConversion_Converter *pConverter, void *pContext, TPdfToolsPdfAConversion_Converter_ConversionEventW pFunction) |
| Removes event handler.
|
|
PDFTOOLS_EXPORT TPdfToolsPdfAConversion_Converter *PDFTOOLS_CALL | PdfToolsPdfAConversion_Converter_New (void) |
|
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfToolsPdfAConversion_Converter_AddInvoiceXml (TPdfToolsPdfAConversion_Converter *pConverter, TPdfToolsPdfAConversion_InvoiceType iInvoiceType, const TPdfToolsSys_StreamDescriptor *pInvoice, const TPdfToolsPdfAConversion_AFRelationship *pAfRelationship) |
| Prepares the invoice XML file (ZUGFeRD or Factur-X) for embedding. Note: This requires the compliance to be set to PDF/A-3.
|
|
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfToolsPdfAConversion_Converter_AddAssociatedFileA (TPdfToolsPdfAConversion_Converter *pConverter, const TPdfToolsSys_StreamDescriptor *pEmbeddedFile, const char *szName, const int *pAssociate, const TPdfToolsPdfAConversion_AFRelationship *pAfRelationship, const char *szMimeType, const char *szDescription, const TPdfToolsSys_Date *pModificationDate) |
| Prepares the associated file for embedding. Add a file to the document’s embedded files. For PDF/A-3, the embedded file is associated with an object of the document, i.e. it is an associated file. The file is embedded as-is. Embedding files is not allowed for PDF/A-1 and restricted to PDF/A conforming files for PDF/A-2.
|
|
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfToolsPdfAConversion_Converter_AddAssociatedFileW (TPdfToolsPdfAConversion_Converter *pConverter, const TPdfToolsSys_StreamDescriptor *pEmbeddedFile, const WCHAR *szName, const int *pAssociate, const TPdfToolsPdfAConversion_AFRelationship *pAfRelationship, const WCHAR *szMimeType, const WCHAR *szDescription, const TPdfToolsSys_Date *pModificationDate) |
| Prepares the associated file for embedding. Add a file to the document’s embedded files. For PDF/A-3, the embedded file is associated with an object of the document, i.e. it is an associated file. The file is embedded as-is. Embedding files is not allowed for PDF/A-1 and restricted to PDF/A conforming files for PDF/A-2.
|
|
PDFTOOLS_EXPORT TPdfToolsPdf_Document *PDFTOOLS_CALL | PdfToolsPdfAConversion_Converter_Convert (TPdfToolsPdfAConversion_Converter *pConverter, TPdfToolsPdfAValidation_AnalysisResult *pAnalysis, TPdfToolsPdf_Document *pDocument, const TPdfToolsSys_StreamDescriptor *pOutStreamDesc, TPdfToolsPdfAConversion_ConversionOptions *pOptions, TPdfToolsPdf_OutputOptions *pOutOptions) |
| Convert a document to PDF/A. Note that it is highly recommended to use TPdfToolsPdfAConversion_Converter_ConversionEvent to detect critical conversion events.
|
|
PDFTOOLS_EXPORT TPdfToolsPdfAConversion_ConversionOptions *PDFTOOLS_CALL | PdfToolsPdfAConversion_ConversionOptions_New (void) |
|
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfToolsPdfAConversion_ConversionOptions_GetConformance (TPdfToolsPdfAConversion_ConversionOptions *pConversionOptions, TPdfToolsPdf_Conformance *pConformance) |
| The minimal target conformance.
|
|
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfToolsPdfAConversion_ConversionOptions_SetConformance (TPdfToolsPdfAConversion_ConversionOptions *pConversionOptions, const TPdfToolsPdf_Conformance *pConformance) |
| The minimal target conformance.
|
|
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfToolsPdfAConversion_ConversionOptions_GetCopyMetadata (TPdfToolsPdfAConversion_ConversionOptions *pConversionOptions) |
| Whether to copy metadata Copy document information dictionary and XMP metadata. Default: TRUE.
|
|
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfToolsPdfAConversion_ConversionOptions_SetCopyMetadata (TPdfToolsPdfAConversion_ConversionOptions *pConversionOptions, BOOL bCopyMetadata) |
| Whether to copy metadata Copy document information dictionary and XMP metadata. Default: TRUE.
|
|
PDFTOOLS_EXPORT double PDFTOOLS_CALL | PdfToolsPdfAConversion_ConversionOptions_GetImageQuality (TPdfToolsPdfAConversion_ConversionOptions *pConversionOptions) |
| Image quality of recompressed images.
|
|
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfToolsPdfAConversion_ConversionOptions_SetImageQuality (TPdfToolsPdfAConversion_ConversionOptions *pConversionOptions, double dImageQuality) |
| Image quality of recompressed images.
|
|
The event for errors, warnings, and informational messages that occur during conversion.
Report a conversion event that occurred in PdfToolsPdfAConversion_Converter_Convert. These events can be used to:
- Generate a detailed conversion report.
- Detect and handle critical conversion events.
Note that if a document cannot be converted to the requested conformance, the PdfToolsPdfAConversion_Converter_Convert throws an exception. However, even if the output document meets all required standards, the conversion might have resulted in differences that might be acceptable in some processes but not in others. Such potentially critical conversion issues are reported as conversion events.
We suggest checking which conversion events can be tolerated in your conversion process and which must be considered critical:
- Parameters
-
[in,out] | pContext | Context of the event callback. |
[in] | szDataPart | The 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] | szMessage | The event message |
[in] | iSeverity | The suggested severity of the event. We suggest checking, which conversion events are tolerable in your conversion process and which must be considered critical. See the documentation of TPdfToolsPdfAConversion_Converter_ConversionEvent for a more detailed description. |
[in] | iCategory | The category of the event. This parameter can be used to:
|
[in] | iCode | The code identifying particular events which can be used for detection and specialized handling of specific events. For most applications, it suffices to handle events by category . |
[in] | szContext | A description of the context where the event occurred |
[in] | iPageNo | The page this event is associated to or 0 |
The event for errors, warnings, and informational messages that occur during conversion.
Report a conversion event that occurred in PdfToolsPdfAConversion_Converter_Convert. These events can be used to:
- Generate a detailed conversion report.
- Detect and handle critical conversion events.
Note that if a document cannot be converted to the requested conformance, the PdfToolsPdfAConversion_Converter_Convert throws an exception. However, even if the output document meets all required standards, the conversion might have resulted in differences that might be acceptable in some processes but not in others. Such potentially critical conversion issues are reported as conversion events.
We suggest checking which conversion events can be tolerated in your conversion process and which must be considered critical:
- Parameters
-
[in,out] | pContext | Context of the event callback. |
[in] | szDataPart | The 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] | szMessage | The event message |
[in] | iSeverity | The suggested severity of the event. We suggest checking, which conversion events are tolerable in your conversion process and which must be considered critical. See the documentation of TPdfToolsPdfAConversion_Converter_ConversionEvent for a more detailed description. |
[in] | iCategory | The category of the event. This parameter can be used to:
|
[in] | iCode | The code identifying particular events which can be used for detection and specialized handling of specific events. For most applications, it suffices to handle events by category . |
[in] | szContext | A description of the context where the event occurred |
[in] | iPageNo | The page this event is associated to or 0 |
Image quality of recompressed images.
The image quality for images that use a prohibited lossy compression type and must be recompressed. Supported values are 0.01
to 1.0
. A higher value means better visual quality at the cost of a larger file size. Recommended values range from 0.7
to 0.9
.
Example: JPX (JPEG2000) is not allowed in PDF/A-1. If a PDF contains a JPX compressed image, its compression type must be altered. Thus the image is converted to an image with JPEG compression using the image quality defined by this property. Default value: 0.8
- Parameters
-
- Returns
- Retrieved value.
May indicate an error in certain scenarios. For further information see the note section below.
- Note
- An error occurred when
-1.0
was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes: