/ PDF / PdfPageOrientation
Search results

PdfPageOrientation API in JavaScript PDF API control

Public enum to define the PDF page orientation.

// Load an existing PDF document
let document: PdfDocument = new PdfDocument(data, password);
// Access first page
let page: PdfPage = document.getPage(0);
// Get the page orientation
let orientation: PdfPageOrientation = page.orientation;
// Destroy the document
document.destroy();
  • landscape - Specifies the type of landscape.
  • portrait - Specifies the type of portrait.