Skip to main content

Trap Network Annotations

A trap network annotation identifies a trap network in a PDF document. Trap networks define trapping information used during commercial printing to compensate for slight misalignment between printing plates.

Trap network annotations are intended for prepress workflows and PDF processing. They preserve information about trap networks contained in a document. PDF viewers may ignore these annotations or display them differently.

Use the TrapNetAnnotation class to create a trap network annotation. Specify annotation bounds and add the annotation to a page.

The following code snippet marks an area that contains trapping information in a document prepared for commercial printing:

void createTrapNetworkAnnotation(Page page) {
    TrapNetAnnotation annotation =
            new TrapNetAnnotation(
                    new RectangleF(15, 15, 25, 25));

    page.getAnnotations().add(annotation);
}
See Also