Skip to content

Instantly share code, notes, and snippets.

@pieterbeens
pieterbeens / gist:7008672
Last active April 17, 2020 14:33
A modified version of DoddleReport iTextSharp PdfReportWriter that supports PDF files with multiple reports by implementing the AppendReport method. I've extracted out the logic that adds a report to the PDF document to a new method named AddReportToDocument and used method Document.NewPage to ensure that every report starts on a new page.
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using DoddleReport;
using iTextSharp.text;
using iTextSharp.text.pdf;
using Font = iTextSharp.text.Font;
using Rectangle = iTextSharp.text.Rectangle;