rename marked content elements and use factory

since the properties in marked content may be indirect references or belong to the page resources array, the value should be calculated during content processing. this change tidies up the marked content classes so they do not expose mutable data and uses the pdf token scanner overloads to load dictionary data.
This commit is contained in:
Eliot Jones
2020-01-09 15:30:16 +00:00
parent 097692f1cb
commit 43574097f1
11 changed files with 431 additions and 344 deletions

View File

@@ -20,7 +20,7 @@
internal class PageContent
{
private readonly IReadOnlyList<Union<XObjectContentRecord, InlineImage>> images;
private readonly IReadOnlyList<PdfMarkedContent> markedContents;
private readonly IReadOnlyList<MarkedContentElement> markedContents;
private readonly IPdfTokenScanner pdfScanner;
private readonly IFilterProvider filterProvider;
private readonly IResourceStore resourceStore;
@@ -35,7 +35,7 @@
internal PageContent(IReadOnlyList<IGraphicsStateOperation> graphicsStateOperations, IReadOnlyList<Letter> letters,
IReadOnlyList<PdfPath> paths,
IReadOnlyList<Union<XObjectContentRecord, InlineImage>> images,
IReadOnlyList<PdfMarkedContent> markedContents,
IReadOnlyList<MarkedContentElement> markedContents,
IPdfTokenScanner pdfScanner,
IFilterProvider filterProvider,
IResourceStore resourceStore,
@@ -65,6 +65,6 @@
}
}
public IReadOnlyList<PdfMarkedContent> GetMarkedContents() => markedContents;
public IReadOnlyList<MarkedContentElement> GetMarkedContents() => markedContents;
}
}