/// <summary> /// Creates a /// <see cref="PdfTrapNetworkAnnotation"/> /// instance. /// </summary> /// <remarks> /// Creates a /// <see cref="PdfTrapNetworkAnnotation"/> /// instance. Note that there shall be at most one trap network annotation /// per page, which shall be the last element in the page’s Annots array. /// TrapNet annotations are deprecated in PDF 2.0. /// </remarks> /// <param name="rect"> /// the annotation rectangle, defining the location of the annotation on the page /// in default user space units. See /// <see cref="PdfAnnotation.SetRectangle(iText.Kernel.Pdf.PdfArray)"/>. /// </param> /// <param name="appearanceStream"> /// the form XObject defining a trap network which body contains the graphics objects needed /// to paint the traps making up the trap network. Process colour model shall be defined for the /// appearance stream (see /// <see cref="iText.Kernel.Pdf.Xobject.PdfFormXObject.SetProcessColorModel(iText.Kernel.Pdf.PdfName)"/>. /// See also ISO-320001 Table 367 "Additional entries specific to a trap network appearance stream". /// </param> public PdfTrapNetworkAnnotation(Rectangle rect, PdfFormXObject appearanceStream) : base(rect) { if (appearanceStream.GetProcessColorModel() == null) { throw new PdfException("Process color model must be set in appearance stream for Trap Network annotation!" ); } SetNormalAppearance(appearanceStream.GetPdfObject()); SetFlags(PdfAnnotation.PRINT | PdfAnnotation.READ_ONLY); }