iTextSharp.text.Chunk.SetAction C# (CSharp) Метод

SetAction() публичный Метод

Sets an action for this Chunk.
public SetAction ( PdfAction action ) : Chunk
action iTextSharp.text.pdf.PdfAction the action
Результат Chunk
        public Chunk SetAction(PdfAction action)
        {
            return SetAttribute(ACTION, action);
        }

Usage Example

Пример #1
0
// ---------------------------------------------------------------------------    
    /**
     * Create a table that can be used as a footer
     * @param pagenumber the page that will use the table as footer
     * @param total the total number of pages
     * @return a tabel
     */
    public PdfPTable CreateNavigationTable(int pagenumber, int total) {
      PdfPTable table = new PdfPTable(4);
      table.DefaultCell.Border = Rectangle.NO_BORDER;
      table.DefaultCell.HorizontalAlignment = Element.ALIGN_CENTER;
      Chunk first = new Chunk(((char)220).ToString(), SYMBOL);
      first.SetAction(actions[0]);
      table.AddCell(new Phrase(first));
      Chunk previous = new Chunk(((char)172).ToString(), SYMBOL);
      previous.SetAction(actions[pagenumber - 2 < 0 ? 0 : pagenumber - 2]);
      table.AddCell(new Phrase(previous));
      Chunk next = new Chunk(((char)174).ToString(), SYMBOL);
      next.SetAction(actions[pagenumber >= total ? total - 1 : pagenumber]);
      table.AddCell(new Phrase(next));
      Chunk last = new Chunk(((char)222).ToString(), SYMBOL);
      last.SetAction(actions[total - 1]);
      table.AddCell(new Phrase(last));
      table.TotalWidth = 120;
      return table;
    }    
All Usage Examples Of iTextSharp.text.Chunk::SetAction