3#ifndef PDFSDK_CORE_ATTACHMENTS_H_INCLUDED_
4#define PDFSDK_CORE_ATTACHMENTS_H_INCLUDED_
11#include <pdfsdk/core/api_macro.h>
38typedef PDErrCode(PDFSDK_CALLCONV* PDAttachmentEnumProc)(
const wchar_t* name, PDFileSpec fileSpec,
void* clientData);
39typedef void(PDFSDK_CALLCONV* PDAttachmentChangedProc)(
const wchar_t* name,
PDAttachmentOperation operation,
void* clientData);
41typedef bool(PDFSDK_CALLCONV* PDFileSpecOnNumericCIProc)(PDAtom key,
double value,
const wchar_t* prefix,
void* clientData);
42typedef bool(PDFSDK_CALLCONV* PDFileSpecOnStringCIProc)(PDAtom key,
const wchar_t* value,
const wchar_t* prefix,
void* clientData);
43typedef bool(PDFSDK_CALLCONV* PDFileSpecOnDateCIProc)(PDAtom key,
const PDDateTime* value,
const wchar_t* prefix,
void* clientData);
45PDF_CORE_API
PDErrCode PDFSDK_CALLCONV PDDocAttachAttachmentChangedCallback(PDDoc doc, PDAttachmentChangedProc proc,
void* clientData);
46PDF_CORE_API
PDErrCode PDFSDK_CALLCONV PDDocDetachAttachmentChangedCallback(PDDoc doc, PDAttachmentChangedProc proc,
void* clientData);
49PDF_CORE_API
PDErrCode PDFSDK_CALLCONV PDDocGetAttachment(PDDoc doc,
const wchar_t* name, PDFileSpec* pFileSpec);
50PDF_CORE_API
PDErrCode PDFSDK_CALLCONV PDDocEnumAttachments(PDDoc doc, PDAttachmentEnumProc proc,
void* clientData);
51PDF_CORE_API
PDErrCode PDFSDK_CALLCONV PDDocAddAttachment(PDDoc doc,
const wchar_t* name, PDFileSpec fileSpec);
52PDF_CORE_API
PDErrCode PDFSDK_CALLCONV PDDocRemoveAttachment(PDDoc doc,
const wchar_t* name);
53PDF_CORE_API
PDErrCode PDFSDK_CALLCONV PDDocGetNumAttachments(PDDoc doc,
size_t* pNumAttachments);
54PDF_CORE_API
PDErrCode PDFSDK_CALLCONV PDDocAttachmentNameByIndex(PDDoc doc,
size_t index,
wchar_t* buffer,
size_t bufsize,
size_t* pSize);
55PDF_CORE_API
PDErrCode PDFSDK_CALLCONV PDDocCreateEmbeddedFile(PDDoc doc,
const wchar_t* path, PDFileSpec* pFileSpec);
57PDF_CORE_API
PDErrCode PDFSDK_CALLCONV PDFileSpecCreate(PDDoc doc, PDAtom fileSys,
const wchar_t* path, PDFileSpec* pFileSpec);
58PDF_CORE_API
PDErrCode PDFSDK_CALLCONV PDFileSpecCreateFromPDObject(
PDObject obj, PDFileSpec* pFileSpec);
59PDF_CORE_API
PDErrCode PDFSDK_CALLCONV PDFileSpecGetPDObject(PDFileSpec fileSpec,
PDObject* pObject);
60PDF_CORE_API
PDErrCode PDFSDK_CALLCONV PDFileSpecSetFileSystem(PDFileSpec fileSpec, PDAtom fileSys);
61PDF_CORE_API
PDErrCode PDFSDK_CALLCONV PDFileSpecGetFileSystem(PDFileSpec fileSpec, PDAtom* pFileSys);
62PDF_CORE_API
PDErrCode PDFSDK_CALLCONV PDFileSpecSetPath(PDFileSpec fileSpec,
const wchar_t* buffer,
size_t bufSize);
63PDF_CORE_API
PDErrCode PDFSDK_CALLCONV PDFileSpecGetPath(PDFileSpec fileSpec,
wchar_t* buffer,
size_t bufSize,
size_t* pSize);
64PDF_CORE_API
PDErrCode PDFSDK_CALLCONV PDFileSpecSetDesc(PDFileSpec fileSpec,
const wchar_t* buffer,
size_t bufSize);
65PDF_CORE_API
PDErrCode PDFSDK_CALLCONV PDFileSpecGetDesc(PDFileSpec fileSpec,
wchar_t* buffer,
size_t bufSize,
size_t* pSize);
66PDF_CORE_API
PDErrCode PDFSDK_CALLCONV PDFileSpecGetCreateDate(PDFileSpec fileSpec,
PDDateTime* pDateTime);
67PDF_CORE_API
PDErrCode PDFSDK_CALLCONV PDFileSpecGetModDate(PDFileSpec fileSpec,
PDDateTime* pDateTime);
68PDF_CORE_API
PDErrCode PDFSDK_CALLCONV PDFileSpecGetFileSize(PDFileSpec fileSpec, int64_t* pFileSize);
69PDF_CORE_API
PDErrCode PDFSDK_CALLCONV PDFileSpecGetThumbnail(PDFileSpec fileSpec, PDDoc doc, PDEXObject* pThumb);
70PDF_CORE_API
PDErrCode PDFSDK_CALLCONV PDFileSpecSetThumbnail(PDFileSpec fileSpec, PDEXObject thumb);
71PDF_CORE_API
PDErrCode PDFSDK_CALLCONV PDFileSpecSaveToFile(PDFileSpec fileSpec,
const wchar_t* path);
73PDF_CORE_API
PDErrCode PDFSDK_CALLCONV PDDocSetEncryptedPayload(PDDoc doc,
const wchar_t* path, PDAtom filter, PDAtom version);
75PDF_CORE_API
PDErrCode PDFSDK_CALLCONV PDDocGetEncryptedPayload(PDDoc doc, PDFileSpec* pFileSpec);
76PDF_CORE_API
PDErrCode PDFSDK_CALLCONV PDDocRemoveEncryptedPayload(PDDoc doc);
77PDF_CORE_API
PDErrCode PDFSDK_CALLCONV PDEncryptedPayloadGetEncryptionProps(PDFileSpec fileSpec, PDAtom* filter, PDAtom* version);
79PDF_CORE_API
PDErrCode PDFSDK_CALLCONV PDFileSpecRemoveCollectionItem(PDFileSpec fileSpec, PDAtom key);
81PDF_CORE_API
PDErrCode PDFSDK_CALLCONV PDFileSpecEnumCollectionItem(PDFileSpec fileSpec,
82 const PDFileSpecOnNumericCIProc numProc,
83 const PDFileSpecOnStringCIProc stringProc,
84 const PDFileSpecOnDateCIProc dateProc,
87PDF_CORE_API
PDErrCode PDFSDK_CALLCONV PDFileSpecGetNumericCollectionItemValue(PDFileSpec fileSpec,
94PDF_CORE_API
PDErrCode PDFSDK_CALLCONV PDFileSpecGetDateCollectionItemValue(PDFileSpec fileSpec,
101PDF_CORE_API
PDErrCode PDFSDK_CALLCONV PDFileSpecGetTextCollectionItemValue(PDFileSpec fileSpec,
104 size_t valBufferSize,
110PDF_CORE_API
PDErrCode PDFSDK_CALLCONV PDFileSpecSetNumericCollectionItemValue(PDFileSpec fileSpec,
113 const wchar_t* prefix);
115PDF_CORE_API
PDErrCode PDFSDK_CALLCONV PDFileSpecSetDateCollectionItemValue(PDFileSpec fileSpec,
118 const wchar_t* prefix);
120PDF_CORE_API
PDErrCode PDFSDK_CALLCONV PDFileSpecSetTextCollectionItemValue(PDFileSpec fileSpec,
122 const wchar_t* value,
123 const wchar_t* prefix);
PDAttachmentOperation
Defines the type of attachment editing operation to perform.
Definition attachments.h:32
@ kPDAttachmentOpUpdate
Definition attachments.h:35
@ kPDAttachmentOpAdd
Definition attachments.h:33
@ kPDAttachmentOpRemove
Definition attachments.h:34
int32_t PDErrCode
Definition errors.h:44