From 62dc93919cf05ebaa434f15824caf0c4b258a0a9 Mon Sep 17 00:00:00 2001 From: Eliot Jones Date: Thu, 3 Jan 2019 22:25:26 +0000 Subject: [PATCH] add the ability to set page content directly on the page builder --- src/UglyToad.PdfPig/Writer/PdfPageBuilder.cs | 25 ++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/UglyToad.PdfPig/Writer/PdfPageBuilder.cs b/src/UglyToad.PdfPig/Writer/PdfPageBuilder.cs index bb417542..8a6fbd46 100644 --- a/src/UglyToad.PdfPig/Writer/PdfPageBuilder.cs +++ b/src/UglyToad.PdfPig/Writer/PdfPageBuilder.cs @@ -33,10 +33,16 @@ /// public PdfRectangle PageSize { get; set; } + /// + /// Access to the underlying data structures for advanced use cases. + /// + public AdvancedEditing Advanced { get; } + internal PdfPageBuilder(int number, PdfDocumentBuilder documentBuilder) { this.documentBuilder = documentBuilder ?? throw new ArgumentNullException(nameof(documentBuilder)); PageNumber = number; + Advanced = new AdvancedEditing(operations); } /// @@ -290,5 +296,24 @@ return value; } + + /// + /// Provides access to the raw page data structures for advanced editing use cases. + /// + public class AdvancedEditing + { + /// + /// The operations making up the page content stream. + /// + public List Operations { get; } + + /// + /// Create a new . + /// + internal AdvancedEditing(List operations) + { + Operations = operations; + } + } } } \ No newline at end of file