I’m building a PDF Document that requires a custom design for every page generated. I want to use the PDFFlowDocument class for its ease at handling multiple page generation, however, I’m unable to use PDFFlowDocument to build up a custom design, and worse at letting it replicate on every other page generated.
Using PDFFixedDocument I can do something like the following code to build some sort of custom design on a page. Is there a way to do the same using PDFFLowDocument and have that design embedded as pageDefaults for all other pages generated?
PDFFixedDocument doc = new PDFFixedDocument();
PDFPage page = doc.Pages.Add();
page.Canvas.DrawFormXObject(logo, X, Y, Width, Height);
page.Canvas.DrawLine(pen, X,Y, Width, Height);
page.Canvas.DrawRectangle(brush, X,Y, Width, Height);