public override void Visit(ExportPage page) { PdfPage = pdfDocument.AddPage(); xGraphics = XGraphics.FromPdfPage(PdfPage); textFormatter = new XTextFormatter(xGraphics); base.Visit(page); }
ExportContainer CreateContainerForSection(ExportPage parent, Point location) { var detail = (ExportContainer)CurrentSection.CreateExportColumn(); detail.Location = location; detail.Parent = parent; return(detail); }
public virtual void Visit(ExportPage page) { foreach (var element in page.ExportedItems) { var ac = element as IAcceptor; ac.Accept(this); } }
protected virtual void AddPage(ExportPage page) { if (Pages.Count == 0) { page.IsFirstPage = true; } Pages.Add(page); }
public static FixedPage CreateFixedPage(ExportPage exportPage) { var fixedPage = new FixedPage(); fixedPage.Width = exportPage.Size.ToWpf().Width; fixedPage.Height = exportPage.Size.ToWpf().Height; fixedPage.Background = new SolidColorBrush(System.Drawing.Color.White.ToWpf()); return(fixedPage); }
public override void Visit(ExportPage page) { fixedPage = FixedDocumentCreator.CreateFixedPage(page); FixedPage = fixedPage; foreach (var element in page.ExportedItems) { AsAcceptor(element).Accept(this); fixedPage.Children.Add(sectionCanvas); } }
private static ExportPage GetPageContent(DisplayResults.DisplayPage displayPage, string tableName) { ExportPage exportPage = new ExportPage(); exportPage.Caption = displayPage.title; exportPage.SubCaption = displayPage.subtitle; exportPage.description = displayPage.description; exportPage.PageName = displayPage.name; foreach (DisplayResults.DisplayPage.DisplayTable displayTable in displayPage.displayTables) { exportPage.Tables.Add(GetTableContent(displayTable, tableName)); } return(exportPage); }
public void ExportUserHistory(FormCollection collection) { var userList = MembershipUserExtended.GetFullNameUserNameList(); string userName = collection["uname"]; if (userList.ContainsValue(userName)) { DateTime startDate; DateTime endDate; if (DateTime.TryParse(collection["startDate"], out startDate) && DateTime.TryParse(collection["endDate"], out endDate)) { var model = TimeTrackManager.GetUserTimeTrackHistoryForSpecifiedPeriod(userName, startDate, endDate); //return PartialView("_GetUserHistory", model); IExportPage export = new ExportPage(); var reportName = model.EmployeeName.Replace(" ", "_") + "_" + model.CustomStartEndDateDisplay.Replace(" ", "-"); export.ExportExcel(ExcelReportHelper.GetExcelString(model, reportName), reportName + ".xls"); } } //return PartialView("_GetUserHistory", new CustomTimeTrack()); }
public override void Visit(ExportPage page) { base.Visit(page); }
public override void Visit(ExportPage page) { evaluator.AddPageInfo(page.PageInfo); base.Visit(page); }