API referenceImport & 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.

C
BOOL32 __stdcall pdfDeleteEmbeddedFile(PPDF IPDF, uint32_t Handle);

Return valueTRUE if the handle referenced a live attachment.

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
[return: MarshalAs(UnmanagedType.Bool)]
Area
Import & Output APIs
Category

Core

Exported names

pdfDeleteEmbeddedFile

String variants

The …A form takes UTF-8, …W takes UTF-16; a bare name aliases the ANSI form.

See working code

Worked examples — complete programs in ten languages.