API referenceCore SDK

pdfGetUserRights

Read the Adobe Reader "extended usage rights" permission

C
int32_t __stdcall pdfGetUserRights(PPDF IPDF);
int32_t __stdcall pdfRemoveUsageRights(PPDF IPDF);
int32_t __stdcall pdfDARemoveUsageRights(PPDF IPDF, int32_t FileHandle);
Delphi
function pdfGetUserRights(const IPDF: PPDF): Integer; stdcall;
function pdfRemoveUsageRights(const IPDF: PPDF): Integer; stdcall;
function pdfDARemoveUsageRights(const IPDF: PPDF; FileHandle: Integer): Integer; stdcall;

Purpose. Read the Adobe Reader "extended usage rights" permission bitmask (/Perms /UR3, granted by an Adobe-signed usage-rights certificate — allows Reader users to save/annotate/etc a form) and remove any such rights.

Description. pdfRemoveUsageRights/pdfDARemoveUsageRights are no-ops by design: this SDK never writes Adobe usage-rights extensions to begin with, so removal always trivially succeeds (there is genuinely nothing present to remove). pdfDARemoveUsageRights's FileHandle follows the same dropped/validate-only pattern as this volume's other DA-prefixed functions.

Parameters.

ParameterDescription
IPDFDocument handle.
FileHandle*(DA only)* Accepted but never consulted.

Return value. pdfGetUserRights: the current /Perms bitmask (0 if none present or IPDF invalid — this engine's own output never carries one, so this is meaningful mainly against an imported signed document, not independently re-verified in this chapter as to whether import-side reading is wired). pdfRemoveUsageRights/pdfDARemoveUsageRights: 1 if IPDF is valid (always trivially "succeeds," per the description).

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern int pdfGetUserRights(IntPtr IPDF);
Area
Core SDK
Category

Getters

Exported names

pdfGetUserRights

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.