Пример #1
0
 /// <summary>
 /// It will be used for OnDataSourceIsEmptyEvent.
 /// </summary>
 /// <param name="pdfDoc">Pdf document object</param>
 /// <param name="pdfRptFont">fonts</param>
 /// <param name="runDirection">A possible run direction value, left-to-right or right-to-left</param>         
 /// <param name="message">a message to show</param>
 /// <returns>PdfGrid</returns>
 public static void AddDefaultEmptyDataSourceTable(Document pdfDoc, IPdfFont pdfRptFont, PdfRunDirection? runDirection, string message = "There is no data available to display.")
 {
     var table = SimpleTable(
                 columnsNumber: 1,
                 pdfCellAttributesList: new List<CellAttributes>
                 {
                     null,
                     new CellAttributes
                     {
                         RowData = new CellRowData
                         {
                             Value = message
                         },
                         ItemTemplate = new TextBlockField(),
                         BasicProperties = new CellBasicProperties
                         {
                             BackgroundColor = BaseColor.WHITE,
                             HorizontalAlignment = HorizontalAlignment.Center,
                             ShowBorder = false,
                             RunDirection = runDirection.HasValue? runDirection.Value : PdfRunDirection.LeftToRight,
                             PdfFont = pdfRptFont,
                             FontColor = new BaseColor(Color.Black.ToArgb()),
                         }
                     },
                     null
                 },
                 showBorder: true
         );
     pdfDoc.Add(table);
 }
Пример #2
0
 /// <summary>
 /// Sets VisibleSignature's info.
 /// It can be null.
 /// </summary>                
 /// <param name="text">Sets the signature text identifying the signer.</param>        
 /// <param name="useLastPageToShowSignature">If it sets to true, value of the Page property will be ignored.</param>
 /// <param name="position">Position and dimension of the field in the page.</param>
 /// <param name="runDirection">Possible run direction values, left-to-right or right-to-left</param>
 /// <param name="pageNumberToShowSignature">The page to place the field. The fist page is 1.</param>
 /// <param name="imagePath">Signature's image. It can be null.</param>
 public void VisibleSignature(string text, bool useLastPageToShowSignature, iTextSharp.text.Rectangle position, PdfRunDirection runDirection, int pageNumberToShowSignature = 1, string imagePath = null)
 {
     _digitalSignature.VisibleSignature = new VisibleSignature
     {
         CustomText = text,
         UseLastPageToShowSignature = useLastPageToShowSignature,
         Position = position,
         RunDirection = runDirection,
         Font = _pdfReport.DataBuilder.PdfFont,
         ImagePath = imagePath,
         PageNumberToShowSignature = pageNumberToShowSignature
     };
 }
 /// <summary>
 /// Sets the run direction to rtl or ltr.
 /// </summary>
 /// <param name="direction">run direction, rtl or ltr</param>
 public void RunDirection(PdfRunDirection direction)
 {
     _pdfReport.DataBuilder.DefaultRunDirection(direction);
 }
 /// <summary>
 /// A Possible run direction value, left-to-right or right-to-left.
 /// </summary>
 public void RunDirection(PdfRunDirection? direction)
 {
     _defaultHeaderProvider.RunDirection = direction;
 }
Пример #5
0
 public EntryTemplate(PdfRunDirection pdfRunDirection)
 {
     _pdfRunDirection = pdfRunDirection;
 }
 public CustomFooter(IPdfFont pdfRptFont, PdfRunDirection direction)
 {
     _direction  = direction;
     _pdfRptFont = pdfRptFont;
     _font       = _pdfRptFont.Fonts[0];
 }
Пример #7
0
        /// <summary>
        /// Using the DefaultFooterProvider class.
        /// </summary>
        /// <param name="printDate">Sets the optional print date value of the DefaultFooterProvider.</param>
        /// <param name="direction">Possible run direction values, left-to-right or right-to-left.</param>
        public void DefaultFooter(string printDate, PdfRunDirection direction = PdfRunDirection.LeftToRight)
        {
            var footer = new DefaultFooterProvider(PdfFont, printDate, direction);

            _pdfReport.DataBuilder.SetFooter(footer);
        }
 public EntryTemplate(PdfRunDirection pdfRunDirection)
 {
     _pdfRunDirection = pdfRunDirection;
 }
Пример #9
0
 /// <summary>
 /// Sets the run direction to rtl or ltr.
 /// If you are setting SetDocumentPreferences method or DocumentPreferences property value directly, ignore this method.
 /// </summary>
 /// <param name="runDirection">run direction, rtl or ltr</param>
 public void DefaultRunDirection(PdfRunDirection runDirection)
 {
     _runDirection = runDirection;
 }
Пример #10
0
 /// <summary>
 /// Sets the run direction to rtl or ltr.
 /// If you are setting SetDocumentPreferences method or DocumentPreferences property value directly, ignore this method.
 /// </summary>
 /// <param name="runDirection">run direction, rtl or ltr</param>
 public void DefaultRunDirection(PdfRunDirection runDirection)
 {
     _runDirection = runDirection;
 }
Пример #11
0
 /// <summary>
 /// Sets the optional print date value of the DefaultFooterProvider.
 /// Use this method or SetFooter method or set the Footer property value directly.
 /// </summary>
 /// <param name="printDate">print date value</param>
 /// <param name="direction">Possible run direction values, left-to-right or right-to-left.</param>
 public void DefaultFooterPrintDate(string printDate, PdfRunDirection direction = PdfRunDirection.LeftToRight)
 {
     _printDate = printDate;
     _direction = direction;
 }
 /// <summary>
 /// Using the DefaultFooterProvider class.
 /// </summary>
 /// <param name="printDate">Sets the optional print date value of the DefaultFooterProvider.</param>
 /// <param name="direction">Possible run direction values, left-to-right or right-to-left.</param>
 public void DefaultFooter(string printDate, PdfRunDirection direction = PdfRunDirection.LeftToRight)
 {
     var footer = new DefaultFooterProvider(PdfFont, printDate, direction);
     _pdfReport.DataBuilder.SetFooter(footer);
 }
Пример #13
0
 public CustomFooter(IPdfFont pdfRptFont, PdfRunDirection direction)
 {
     _direction = direction;
     _pdfRptFont = pdfRptFont;
     _font = _pdfRptFont.Fonts[0];
 }
Пример #14
0
 /// <summary>
 /// Sets VisibleSignature's info.
 /// It can be null.
 /// </summary>
 /// <param name="text">Sets the signature text identifying the signer.</param>
 /// <param name="useLastPageToShowSignature">If it sets to true, value of the Page property will be ignored.</param>
 /// <param name="position">Position and dimension of the field in the page.</param>
 /// <param name="runDirection">Possible run direction values, left-to-right or right-to-left</param>
 /// <param name="pageNumberToShowSignature">The page to place the field. The fist page is 1.</param>
 /// <param name="imagePath">Signature's image. It can be null.</param>
 public void VisibleSignature(string text, bool useLastPageToShowSignature, iTextSharp.text.Rectangle position, PdfRunDirection runDirection, int pageNumberToShowSignature = 1, string imagePath = null)
 {
     _digitalSignature.VisibleSignature = new VisibleSignature
     {
         CustomText = text,
         UseLastPageToShowSignature = useLastPageToShowSignature,
         Position     = position,
         RunDirection = runDirection,
         Font         = _pdfReport.DataBuilder.PdfFont,
         ImagePath    = imagePath,
         PageNumberToShowSignature = pageNumberToShowSignature
     };
 }
Пример #15
0
 /// <summary>
 /// Our DefaultFooter writes current date and page numbers at the bottom of the pages.
 /// </summary>
 /// <param name="pdfRptFont">Selected font</param>
 /// <param name="printDate">Current date</param>
 /// <param name="direction">rtl or ltr</param>
 public DefaultFooterProvider(IPdfFont pdfRptFont, string printDate, PdfRunDirection direction)
 {
     _pdfRptFont = pdfRptFont;
     _printDate = printDate;
     _direction = direction;
 }
Пример #16
0
 /// <summary>
 /// Sets the run direction to rtl or ltr.
 /// </summary>
 /// <param name="direction">run direction, rtl or ltr</param>
 public void RunDirection(PdfRunDirection direction)
 {
     _pdfReport.DataBuilder.DefaultRunDirection(direction);
 }
Пример #17
0
 /// <summary>
 /// Our DefaultFooter writes current date and page numbers at the bottom of the pages.
 /// </summary>
 /// <param name="pdfRptFont">Selected font</param>
 /// <param name="printDate">Current date</param>
 /// <param name="direction">rtl or ltr</param>
 public DefaultFooterProvider(IPdfFont pdfRptFont, string printDate, PdfRunDirection direction)
 {
     _pdfRptFont = pdfRptFont;
     _printDate  = printDate;
     _direction  = direction;
 }
Пример #18
0
 /// <summary>
 /// Sets the optional print date value of the DefaultFooterProvider.
 /// Use this method or SetFooter method or set the Footer property value directly.
 /// </summary>
 /// <param name="printDate">print date value</param>
 /// <param name="direction">Possible run direction values, left-to-right or right-to-left.</param>
 public void DefaultFooterPrintDate(string printDate, PdfRunDirection direction = PdfRunDirection.LeftToRight)
 {
     _printDate = printDate;
     _direction = direction;
 }