Pdf - PdfPrinterMarkOrientation
18 Nov 20261 minute to read
Defines the orientation options for printer marks.
// Load an existing PDF document
let document: PdfDocument = new PdfDocument(data);
// Access the first page
let page: PdfPage = document.getPage(0) as PdfPage;
// Create a printer mark annotation
let annotation: PdfPrinterMarkAnnotation = new PdfPrinterMarkAnnotation(
{ x: 0, y: 0, width: 100, height: 100 }
);
// Set the printer mark orientation
annotation.orientation = PdfPrinterMarkOrientation.Horizontal;
// Add the annotation to the page
page.annotations.add(annotation);
// Save the document
document.save('output.pdf');
// Destroy the document
document.destroy();-
Horizontal- Specifies horizontal orientation. -
Vertical- Specifies vertical orientation.