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); }
public IBlockFormatter Table(DataView data, IEnumerable <PrintColumnInfo> columnsInfo, string title) { return(new RelayBlockFormatter(width => _tblFormatter.FormatData(data, columnsInfo, width))); }