8
0
2024-01-24 16:42:38 +01:00

118 lines
3.8 KiB
C

/*--------------------------------------------------------------------------*/
/* */
/* LuraTech ZUGFeRD Extraction SDK */
/* */
/*--------------------------------------------------------------------------*/
/* */
/* Author: Andreas Hirth */
/* Company: LuraTech Imaging GmbH */
/* File: pdf_zugferd.h */
/* Version: v1.00 */
/* */
/*--------------------------------------------------------------------------*/
/* */
/* Description: */
/* */
/* LuraTech ZUGFeRD Extraction C-SDK common header file */
/* */
/* Conforms to the version 1.0 (Final) of the ZUGFeRD */
/* specification. */
/* */
/*--------------------------------------------------------------------------*/
#ifndef PDF_ZUGFERD_H_INCLUDED
#define PDF_ZUGFERD_H_INCLUDED
#ifdef __cplusplus
extern "C" {
#endif
#if (defined(WIN32) || defined(WIN64)) && defined(ZUGF_DLL_EXPORTS)
#define ZUGF_API __declspec(dllexport)
#else
#define ZUGF_API
#endif
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
/* */
/* Version Information */
/* */
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
#define ZUGF_SDK_VERSION 1.05
#define ZUGF_SDK_VERSION_STRING "v1.05"
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
/* */
/* Error codes */
/* */
/* Errors are identified by negative values, whereas warnings have */
/* positive values associated. */
/* */
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
#define cZUGF_Error_OK 0
/* Document is not PDF/A-3 */
#define cZUGF_Error_Invalid_Zugferd -1
/* Document XMP Metadata is not ZUGFeRD compliant */
#define cZUGF_Error_Invalid_Zugferd_Metadata -2
/* ZUGFeRD XML could not be found in the document */
#define cZUGF_Error_Missing_Zugferd_XML -3
#define cZUGF_Error_Failure_Read -10
#define cZUGF_Error_Failure_Write -11
#define cZUGF_Error_Failure_Alloc -12
#define cZUGF_Error_Unsupported -20
#define cZUGF_Error_Fatal -500
typedef long ZUGF_Error;
/*--------------------------------------------------------------------------*/
/* */
/* Check if a given PDF document is a ZUGFeRD PDF */
/* */
/*--------------------------------------------------------------------------*/
/* */
/* const char *szPdfFile : Path to the PDF file to open. */
/* */
/* Returns cZUGF_Error_OK if the document could be opened and contains the */
/* ZUGFeRD metadata. */
/* Otherwise one of the other ZUGF_Error values is returned. */
/* */
/*--------------------------------------------------------------------------*/
ZUGF_API ZUGF_Error ZUGF_Check_Zugferd( const char *szPdfFile);
/*--------------------------------------------------------------------------*/
/* */
/* Extract the ZUGFeRD XML data from a given PDF document */
/* */
/*--------------------------------------------------------------------------*/
/* */
/* const char *szPdfFile : Path to the PDF file to open. */
/* const char *szXmlFile : Path to the XML file to write. */
/* */
/* Error code returned */
/* */
/*--------------------------------------------------------------------------*/
ZUGF_API ZUGF_Error ZUGF_Extract_Zugferd( const char *szPdfFile,
const char *szXmlFile);
#ifdef __cplusplus
}
#endif
#endif