Web SDKv1.0.0

PagesApi.getRotation()

The page's rotation as the file holds it: 0, 90, 180 or 270.
methodReadingsince 1.0.0

Signature

getRotation(pageIndex: number): Promise<PageOrientation>

Parameters

ParameterTypeDescription
pageIndexnumberZero-based page index.

Returns

Promise<PageOrientation> 0, 90, 180 or 270.

Throws

  • INVALID_ARGUMENT — a page index out of range.
  • DOCUMENT_CLOSED — the document has been closed.

Example

TypeScript
const upright = (await doc.pages.getRotation(0)) === 0;

More in PagesApi