add the ability to set page content directly on the page builder

This commit is contained in:
Eliot Jones
2019-01-03 22:25:26 +00:00
parent 5c8a77bf33
commit 62dc93919c

View File

@@ -33,10 +33,16 @@
/// </summary>
public PdfRectangle PageSize { get; set; }
/// <summary>
/// Access to the underlying data structures for advanced use cases.
/// </summary>
public AdvancedEditing Advanced { get; }
internal PdfPageBuilder(int number, PdfDocumentBuilder documentBuilder)
{
this.documentBuilder = documentBuilder ?? throw new ArgumentNullException(nameof(documentBuilder));
PageNumber = number;
Advanced = new AdvancedEditing(operations);
}
/// <summary>
@@ -290,5 +296,24 @@
return value;
}
/// <summary>
/// Provides access to the raw page data structures for advanced editing use cases.
/// </summary>
public class AdvancedEditing
{
/// <summary>
/// The operations making up the page content stream.
/// </summary>
public List<IGraphicsStateOperation> Operations { get; }
/// <summary>
/// Create a new <see cref="AdvancedEditing"/>.
/// </summary>
internal AdvancedEditing(List<IGraphicsStateOperation> operations)
{
Operations = operations;
}
}
}
}