API reference › Import & Output APIs
pdfStoreCustomDataFromFile
Store a file's raw bytes as a private blob under
| Exported names | pdfStoreCustomDataFromFile (bare = ANSI), …A, …W; companion pdfStoreCustomDataFromString |
|---|
Purpose — Store a file's raw bytes as a private blob under (Location, Key).
Description — The blob lives in an instance-side dictionary keyed by Location and Key (the same key under different locations is two independent blobs; storing an existing pair overwrites). Blobs serialize into a private /LumasCustomData dictionary on the catalog. Options is accepted for ABI compatibility and ignored.
int32_t __stdcall pdfStoreCustomDataFromFileA(PPDF IPDF, const char* Key, const char* FileName, int32_t Location, int32_t Options);
int32_t __stdcall pdfStoreCustomDataFromFileW(PPDF IPDF, const wchar_t* Key, const wchar_t* FileName, int32_t Location, int32_t Options);
Return value — 1 on success; 0 for an empty key, missing/unreadable file, or invalid instance handle.
C# (P/Invoke)
public static extern int pdfStoreCustomDataFromFileW(IntPtr IPDF, IntPtr Key, IntPtr FileName, int Location, int Options);
public static extern int pdfStoreCustomDataFromFile(IntPtr IPDF, IntPtr Key, IntPtr FileName, int Location, int Options);
public static extern int pdfStoreCustomDataFromFileA(IntPtr IPDF, IntPtr Key, IntPtr FileName, int Location, int Options);
Core
pdfStoreCustomDataFromFileW
pdfStoreCustomDataFromFile
pdfStoreCustomDataFromFileA
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.