pdfDAShiftedHeader
Per its name and ABI shape, this appears intended to detect
int32_t __stdcall pdfDAShiftedHeader(PPDF IPDF, int32_t FileHandle);
function pdfDAShiftedHeader(const IPDF: PPDF; FileHandle: Integer): Integer; stdcall;
Purpose. Per its name and ABI shape, this appears intended to detect or repair a PDF file whose %PDF- header is not at byte offset 0 (a "shifted header," e.g. because of a prepended email/HTTP wrapper) — paired with sibling digital-signature "usage rights" helpers in the same source group (pdfDARemoveUsageRights, not covered in this volume).
Description. Non-operational in this release. The entire implementation is if GapDoc(IPDF) = nil then Result := 0 else Result := 1 — it performs no file-header inspection, no shift detection, and no repair of any kind. FileHandle is accepted but never read. The return value communicates nothing beyond "was IPDF a valid document handle."
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle — only its validity affects the result. |
FileHandle | Accepted but never read. |
Return value. 1 if IPDF is valid; 0 otherwise. Carries no information about the target file's header state.
Remarks. Treat this as unimplemented despite its BOOL32-shaped success return; do not rely on it to detect or fix a shifted PDF header.
C# (P/Invoke)
public static extern int pdfDAShiftedHeader(IntPtr IPDF, int FileHandle);
Core
pdfDAShiftedHeader
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.