Example #1
0
 /// <summary>
 /// Sets a
 /// <see cref="iText.Kernel.Pdf.Action.PdfAction"/>
 /// to this annotation which will be performed when the annotation is activated.
 /// </summary>
 /// <param name="action">
 ///
 /// <see cref="iText.Kernel.Pdf.Action.PdfAction"/>
 /// to set to this annotation.
 /// </param>
 /// <returns>
 /// this
 /// <see cref="PdfLinkAnnotation"/>
 /// instance.
 /// </returns>
 public virtual iText.Kernel.Pdf.Annot.PdfLinkAnnotation SetAction(PdfAction action)
 {
     if (GetDestinationObject() != null)
     {
         RemoveDestination();
         logger.Warn(iText.IO.LogMessageConstant.ACTION_WAS_SET_TO_LINK_ANNOTATION_WITH_DESTINATION);
     }
     return((iText.Kernel.Pdf.Annot.PdfLinkAnnotation)Put(PdfName.A, action.GetPdfObject()));
 }
 /// <summary>
 /// Sets a
 /// <see cref="iText.Kernel.Pdf.Action.PdfAction"/>
 /// to this annotation which will be performed when the annotation is activated.
 /// </summary>
 /// <param name="action">
 ///
 /// <see cref="iText.Kernel.Pdf.Action.PdfAction"/>
 /// to set to this annotation.
 /// </param>
 /// <returns>
 /// this
 /// <see cref="PdfWidgetAnnotation"/>
 /// instance.
 /// </returns>
 public virtual iText.Kernel.Pdf.Annot.PdfWidgetAnnotation SetAction(PdfAction action)
 {
     return((iText.Kernel.Pdf.Annot.PdfWidgetAnnotation)Put(PdfName.A, action.GetPdfObject()));
 }
Example #3
0
 public virtual iText.Kernel.Pdf.Annot.PdfLinkAnnotation SetUriAction(PdfAction action)
 {
     return((iText.Kernel.Pdf.Annot.PdfLinkAnnotation)Put(PdfName.PA, action.GetPdfObject()));
 }
Example #4
0
 public virtual iText.Kernel.Pdf.PdfCatalog SetOpenAction(PdfAction action)
 {
     return(Put(PdfName.OpenAction, action.GetPdfObject()));
 }
Example #5
0
 public override PdfAnnotation SetAction(PdfAction action)
 {
     return((iText.Kernel.Pdf.Annot.PdfLinkAnnotation)Put(PdfName.A, action.GetPdfObject()));
 }
Example #6
0
 /// <summary>
 /// Adds
 /// <see cref="iText.Kernel.Pdf.Action.PdfAction"/>
 /// for the outline,
 /// <c>A</c>
 /// key.
 /// </summary>
 /// <param name="action">
 /// instance of
 /// <see cref="iText.Kernel.Pdf.Action.PdfAction"/>.
 /// </param>
 public virtual void AddAction(PdfAction action)
 {
     content.Put(PdfName.A, action.GetPdfObject());
 }