Crop marks

Hello,

I am using Aspose.Pdf to dynamically create business cards for a client. As these cards will be professionally printed they need to include crop marks (such as these). Can the component produce these automatically, and if so, how? I’ve tried using the BleedBox property but this doesn’t seem to have any effect on the document.

Hi James,


Thanks for your interest in our products.

I am afraid the requested feature is
currently not supported but for the sake of implementation, I have logged this
requirement in our issue tracking system under New Features list as PDFNEWNET-34214. We will investigate this issue in details
and will keep you updated on the status of a correction.

We are sorry for your inconvenience.

This seems to be releated to PDFNEWNET-38296. Can I get a status as to both of these issues please?

Hi Dirk,


Thanks for your inquiry. Yes you are right both issues are related, Printer mark feature support. These issue are pending for implementation. We we will notify you as soon as the feature is implemented.

We are sorry for the inconvenience caused.

Best Regards,

It’s been a year. Have you implemented a crop marks feature yet?

Hi Dirk,


Thanks for your inquiry. I am afraid the logged feature is still pending for analysis as product team is busy in other issues/features in the queue. However, we have recorded your concern and raised the issue priority as well, we will notify you as soon as we made some significant progress towards issue resolution.

We are sorry for the inconvenience caused.

Best Regards,

@jcoxhead @dirq
Annotations

  • TrimMarkAnnotation
  • BleedMarkAnnotation
  • RegistrationMarkAnnotation
  • PageInformationAnnotation

and various options for adding them to the document have been implemented for version 24.05.
How to add printer marks manually:

// 1. Add margins on each side of the page, so that marks will be visible
var editor = new PdfFileEditor();
editor.AddMargins("input.pdf", "temp.pdf", new[] { 1 }, 36, 36, 36, 36);

using (var document = new Document("temp.pdf"))
{
    var page = document.Pages[1];
    var mediaBox = page.MediaBox;

    // 2. Set Page.TrimBox and Page.BleedBox not to include margins. The printer marks are placed between the MediaBox and these boxes
    page.TrimBox = new Rectangle(36, 36, mediaBox.URX - 36, mediaBox.URY - 36);
    // The BleedBox is usually slightly larger than the TrimBox
    page.BleedBox = new Rectangle(34, 34, mediaBox.URX - 34, mediaBox.URY - 34);

    // 3. Add trim mark in the corners of the TrimBox
    page.Annotations.Add(new TrimMarkAnnotation(page, PrinterMarkCornerPosition.TopLeft));
    page.Annotations.Add(new TrimMarkAnnotation(page, PrinterMarkCornerPosition.TopRight));
    page.Annotations.Add(new TrimMarkAnnotation(page, PrinterMarkCornerPosition.BottomLeft));
    page.Annotations.Add(new TrimMarkAnnotation(page, PrinterMarkCornerPosition.BottomRight));

    // 4. Add bleed marks in the corners of the bleed box
    page.Annotations.Add(new BleedMarkAnnotation(page, PrinterMarkCornerPosition.TopLeft));
    page.Annotations.Add(new BleedMarkAnnotation(page, PrinterMarkCornerPosition.TopRight));
    page.Annotations.Add(new BleedMarkAnnotation(page, PrinterMarkCornerPosition.BottomLeft));
    page.Annotations.Add(new BleedMarkAnnotation(page, PrinterMarkCornerPosition.BottomRight));

    // 5. Add color registration targets on all sides of the page
    page.Annotations.Add(new RegistrationMarkAnnotation(page, PrinterMarkSidePosition.Top));
    page.Annotations.Add(new RegistrationMarkAnnotation(page, PrinterMarkSidePosition.Bottom));
    page.Annotations.Add(new RegistrationMarkAnnotation(page, PrinterMarkSidePosition.Left));
    page.Annotations.Add(new RegistrationMarkAnnotation(page, PrinterMarkSidePosition.Right));

    // 6. Add the page information annotation in the bottom of the page, below the TrimBox
    var annotRectangle = new Rectangle(page.TrimBox.LLX, mediaBox.LLY, page.TrimBox.URX, page.TrimBox.LLY);
    page.Annotations.Add(new PageInformationAnnotation(page, annotRectangle));

    document.Save("output.pdf");
}

How to add printer marks in automated mode:

// 1. Add margins on each side of the page, so that marks will be visible
var editor = new PdfFileEditor();
editor.AddMargins("input.pdf", "temp.pdf", new[] { 1 }, 36, 36, 36, 36);

using (var document = new Document("temp.pdf"))
{
    PrinterMarkAnnotation.AddPrinterMarks(document, PrinterMarksKind.TrimMarks | PrinterMarksKind.BleedMarks | PrinterMarksKind.RegistrationMarks | PrinterMarksKind.ColorBars);
    document.Save("output.pdf");
}

You can explicitly specify rectangles

document.Pages[1].BleedBox = new Rectangle(10, 10, 590, 835);
document.Pages[1].TrimBox = new Rectangle(20, 20, 580, 825);