PDF SDK Documentation

Comprehensive Guide for Developers: Features, Integration, and API Reference

Loading...
Searching...
No Matches
attachments.h
Go to the documentation of this file.
1// Copyright (c) 2009-2025 Avanquest Software. All rights reserved.
2
3#ifndef PDFSDK_CORE_ATTACHMENTS_H_INCLUDED_
4#define PDFSDK_CORE_ATTACHMENTS_H_INCLUDED_
5
11#include <pdfsdk/core/api_macro.h>
12#include <pdfsdk/core/atoms.h>
13#include <pdfsdk/core/content.h>
15#include <pdfsdk/errors.h>
16#include <pdfsdk/math_types.h>
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
37
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);
40
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);
44
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);
47PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDDocNotifyAttachmentChanged(PDDoc doc, const wchar_t* name, PDAttachmentOperation operation);
48
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);
56
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);
72
73PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDDocSetEncryptedPayload(PDDoc doc, const wchar_t* path, PDAtom filter, PDAtom version);
74
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);
78
79PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFileSpecRemoveCollectionItem(PDFileSpec fileSpec, PDAtom key);
80
81PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFileSpecEnumCollectionItem(PDFileSpec fileSpec,
82 const PDFileSpecOnNumericCIProc numProc,
83 const PDFileSpecOnStringCIProc stringProc,
84 const PDFileSpecOnDateCIProc dateProc,
85 void* clientData);
86
87PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFileSpecGetNumericCollectionItemValue(PDFileSpec fileSpec,
88 PDAtom key,
89 double* value,
90 wchar_t* prefix,
91 size_t bufferSize,
92 size_t* pSize);
93
94PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFileSpecGetDateCollectionItemValue(PDFileSpec fileSpec,
95 PDAtom key,
96 PDDateTime* value,
97 wchar_t* prefix,
98 size_t bufferSize,
99 size_t* pSize);
100
101PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFileSpecGetTextCollectionItemValue(PDFileSpec fileSpec,
102 PDAtom key,
103 wchar_t* value,
104 size_t valBufferSize,
105 size_t* vSize,
106 wchar_t* prefix,
107 size_t bufferSize,
108 size_t* pSize);
109
110PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFileSpecSetNumericCollectionItemValue(PDFileSpec fileSpec,
111 PDAtom key,
112 double value,
113 const wchar_t* prefix);
114
115PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFileSpecSetDateCollectionItemValue(PDFileSpec fileSpec,
116 PDAtom key,
117 const PDDateTime* value,
118 const wchar_t* prefix);
119
120PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFileSpecSetTextCollectionItemValue(PDFileSpec fileSpec,
121 PDAtom key,
122 const wchar_t* value,
123 const wchar_t* prefix);
124
125#ifdef __cplusplus
126}
127#endif
128
129#endif // PDFSDK_CORE_ATTACHMENTS_H_INCLUDED_
Atom API.
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
Content API.
Document API.
Error codes.
int32_t PDErrCode
Definition errors.h:44
Math types.
Progress Monitor API.
Definition types.h:23
Definition objects.h:83