Ejemplo n.º 1
0
 /**
 * Creates a new layer.
 * @param name the name of the layer
 * @param writer the writer
 */
 public PdfLayer(String name, PdfWriter writer)
     : base(PdfName.OCG)
 {
     Name = name;
     refi = writer.PdfIndirectReference;
     writer.RegisterLayer(this);
 }
Ejemplo n.º 2
0
 /**
 * Creates a title layer. A title layer is not really a layer but a collection of layers
 * under the same title heading.
 * @param title the title text
 * @param writer the <CODE>PdfWriter</CODE>
 * @return the title layer
 */
 public static PdfLayer CreateTitle(String title, PdfWriter writer)
 {
     if (title == null)
         throw new ArgumentNullException("Title cannot be null.");
     PdfLayer layer = new PdfLayer(title);
     writer.RegisterLayer(layer);
     return layer;
 }