pdfSetAnnotMigrationState
Set an annotation's review/migration state (e.g. Accepted/
int32_t __stdcall pdfSetAnnotMigrationStateA(PPDF IPDF, uint32_t Annot, TAnnotState State, const char* User);
int32_t __stdcall pdfSetAnnotMigrationStateW(PPDF IPDF, uint32_t Annot, TAnnotState State, const wchar_t* User);
function pdfSetAnnotMigrationStateA(const IPDF: PPDF; Annot: Cardinal; State: TAnnotState; const User: PAnsiChar): Integer; stdcall;
function pdfSetAnnotMigrationStateW(const IPDF: PPDF; Annot: Cardinal; State: TAnnotState; const User: PWideChar): Integer; stdcall;
Purpose. Set an annotation's review/migration state (e.g. Accepted/ Rejected/Cancelled/Completed/None) and the reviewing user's name — the /StateModel+/State review-workflow mechanism.
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
Annot | Document-wide annotation handle. |
State | The review-state enum value. |
User | Reviewer name. W is UTF-8-encoded before storage; A is stored as given. |
Return value. -1 if IPDF is invalid; otherwise reflects SetAnnotMigrationStateH's own success/failure encoding (not independently re-verified beyond the null-handle guard in this chapter).
C# (P/Invoke)
public static extern int pdfSetAnnotMigrationStateA(IntPtr IPDF, uint Annot, TAnnotState State, [MarshalAs(UnmanagedType.LPStr)] string User);
public static extern int pdfSetAnnotMigrationStateW(IntPtr IPDF, uint Annot, TAnnotState State, [MarshalAs(UnmanagedType.LPWStr)] string User);
Annotations
pdfSetAnnotMigrationStateA
pdfSetAnnotMigrationStateW
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.