Beispiel #1
0
        private void AddDocumentOverview()
        {
            Head3 head = new Head3()
            {
                Text = "Document Overview"
            };

            this.Contents.Add(head);

            TableGrid tbl = new TableGrid();

            this.Contents.Add(tbl);

            if (null != this.GenerationData.DocumentInfo &&
                !string.IsNullOrEmpty(this.GenerationData.DocumentInfo.Title))
            {
                this.AddOverviewRow(tbl, "Title", this.GenerationData.DocumentInfo.Title);
            }

            if (null != this.GenerationData.DocumentID)
            {
                this.AddOverviewRow(tbl, "Document ID", Convert.ToBase64String(this.GenerationData.DocumentID.One) + "." + Convert.ToBase64String(this.GenerationData.DocumentID.Two));
            }

            if (!string.IsNullOrEmpty(this.GenerationData.TemplatePath))
            {
                this.AddOverviewRow(tbl, "Source Template", this.GenerationData.TemplatePath);
            }

            this.AddOverviewRow(tbl, "Scryber Version", this.GenerationData.ScryberVersion.ToString() + " (" + this.GenerationData.ScryberFileVersion + ")");
            this.AddOverviewRow(tbl, "Document Size", GetMbSizeString(this.GenerationData.DocumentSize));
            this.AddOverviewRow(tbl, "Generation Time ", GetGenTimeString(this.GenerationData.DocumentGenerationTime));
            this.AddOverviewRow(tbl, "Trace Level", this.GenerationData.TraceLevel.ToString());
        }
Beispiel #2
0
        private void AddTraceLog(Logging.PDFCollectorTraceLog log)
        {
            Head3 head = new Head3()
            {
                Text = "Document Log"
            };

            this.Contents.Add(head);

            TableGrid tbl = new TableGrid()
            {
                StyleClass = "log-grid"
            };

            this.Contents.Add(tbl);

            TableHeaderRow top = new TableHeaderRow();

            tbl.Rows.Add(top);

            TableCell cell = new TableHeaderCell()
            {
                Width = 60
            };

            cell.Contents.Add(new TextLiteral("Time (ms)"));
            top.Cells.Add(cell);

            cell = new TableHeaderCell()
            {
                Width = 60
            };
            cell.Contents.Add(new TextLiteral("Level"));
            top.Cells.Add(cell);

            cell = new TableHeaderCell()
            {
                Width = 100
            };
            cell.Contents.Add(new TextLiteral("Category"));
            top.Cells.Add(cell);

            cell = new TableHeaderCell();
            cell.Contents.Add(new TextLiteral("Message"));
            top.Cells.Add(cell);

            foreach (Logging.PDFCollectorTraceLogEntry entry in log)
            {
                this.AddLogEntry(tbl, entry);
            }
        }
Beispiel #3
0
        private void AddPerformance(PDFPerformanceMonitor perfdata)
        {
            Head3 head = new Head3()
            {
                Text = "Performance Metrics"
            };

            this.Contents.Add(head);

            TableGrid tbl = new TableGrid();

            this.Contents.Add(tbl);

            TableHeaderRow top = new TableHeaderRow();

            tbl.Rows.Add(top);

            TableCell cell = new TableHeaderCell();

            cell.Contents.Add(new TextLiteral("Entry"));
            top.Cells.Add(cell);


            cell = new TableHeaderCell()
            {
                StyleClass = "number", Width = 100
            };

            cell.Contents.Add(new TextLiteral("Duration (ms)"));
            top.Cells.Add(cell);

            cell = new TableHeaderCell()
            {
                StyleClass = "number", Width = 60
            };
            cell.Contents.Add(new TextLiteral("Count"));
            top.Cells.Add(cell);

            foreach (PDFPerformanceMonitorEntry entry in perfdata)
            {
                if (entry.MonitorCount > 0)
                {
                    this.AddPerformanceEntry(tbl, entry);
                }
            }
        }