Pdf - PdfPrinterMarkType

18 Nov 20261 minute to read

Defines the printer mark types that can be added to a PDF page.

// 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 type
annotation.markType = PdfPrinterMarkType.Crop;
// Add the annotation to the page
page.annotations.add(annotation);
// Save the document
document.save('output.pdf');
// Destroy the document
document.destroy();
  • Bleed - Specifies bleed marks.
  • ColorBar - Specifies color bar marks.
  • Crop - Specifies crop marks.
  • Fold - Specifies fold marks.
  • PageInformation - Specifies page information marks.
  • Registration - Specifies registration marks.