API reference › Import & Output APIs
pdfDeleteEmbeddedFile
Remove an attachment so it is not written to the output.
Purpose — Remove an attachment so it is not written to the output.
Description — Tombstones the slot (name and data cleared; the slot is skipped when /EmbeddedFiles is serialized). Handles of other attachments do not shift, and pdfGetEmbeddedFileCount still counts the deleted slot; reads on a deleted handle return FALSE. Deleting the same handle twice fails.
BOOL32 __stdcall pdfDeleteEmbeddedFile(PPDF IPDF, uint32_t Handle);
Return value — TRUE if the handle referenced a live attachment.
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Core
pdfDeleteEmbeddedFile
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.