RegisterLayer() private méthode

private RegisterLayer ( IPdfOCG layer ) : void
layer IPdfOCG
Résultat void
Exemple #1
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(MessageLocalization.GetComposedMessage("title.cannot.be.null"));
     PdfLayer layer = new PdfLayer(title);
     writer.RegisterLayer(layer);
     return layer;
 }
Exemple #2
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);
 }
Exemple #3
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;
     if (writer is PdfStamperImp)
         refi = writer.AddToBody(this).IndirectReference;
     else
         refi = writer.PdfIndirectReference;
     writer.RegisterLayer(this);
 }
Exemple #4
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;
 }