protected override DocumentPaginator GetDocumentPaginator(Size maxPageSize)
        {
            var tblFormatter = new TableFormatter();
            var table = tblFormatter.FormatData(_data, _columnsInfo, maxPageSize.Width);

            var doc = new TitledBlockContentTemplate
                          {
                              Title = _title,
                              PageHeight = maxPageSize.Height,
                              PageWidth = maxPageSize.Width,
                              ColumnWidth = maxPageSize.Width,
                              PagePadding = new Thickness(0)
                          };

            doc.AppendBlock(table);

            return ((IDocumentPaginatorSource) doc).DocumentPaginator;
        }
Ejemplo n.º 2
0
        protected override DocumentPaginator GetDocumentPaginator(Size maxPageSize)
        {
            var tblFormatter = new TableFormatter();
            var table        = tblFormatter.FormatData(_data, _columnsInfo, maxPageSize.Width);

            var doc = new TitledBlockContentTemplate
            {
                Title       = _title,
                PageHeight  = maxPageSize.Height,
                PageWidth   = maxPageSize.Width,
                ColumnWidth = maxPageSize.Width,
                PagePadding = new Thickness(0)
            };

            doc.AppendBlock(table);

            return(((IDocumentPaginatorSource)doc).DocumentPaginator);
        }