|
12 | 12 | using Tokenization.Scanner; |
13 | 13 | using Tokens; |
14 | 14 |
|
15 | | - internal sealed class PageContentParser : IPageContentParser |
| 15 | + /// <summary> |
| 16 | + /// Provides functionality to parse the content of a PDF page, extracting graphics state operations |
| 17 | + /// from the input data. This class is responsible for interpreting the PDF content stream and |
| 18 | + /// converting it into a collection of operations. |
| 19 | + /// </summary> |
| 20 | + public sealed class PageContentParser : IPageContentParser |
16 | 21 | { |
17 | 22 | private readonly IGraphicsStateOperationFactory operationFactory; |
18 | 23 | private readonly bool useLenientParsing; |
19 | 24 |
|
| 25 | + /// <summary> |
| 26 | + /// Initialises a new instance of the <see cref="PageContentParser"/> class. |
| 27 | + /// </summary> |
| 28 | + /// <param name="operationFactory"> |
| 29 | + /// The factory responsible for creating graphics state operations. |
| 30 | + /// </param> |
| 31 | + /// <param name="useLenientParsing"> |
| 32 | + /// A value indicating whether lenient parsing should be used. Defaults to <c>false</c>. |
| 33 | + /// </param> |
20 | 34 | public PageContentParser(IGraphicsStateOperationFactory operationFactory, bool useLenientParsing = false) |
21 | 35 | { |
22 | 36 | this.operationFactory = operationFactory; |
23 | 37 | this.useLenientParsing = useLenientParsing; |
24 | 38 | } |
25 | 39 |
|
| 40 | + /// <summary> |
| 41 | + /// Parses the content of a PDF page and extracts a collection of graphics state operations. |
| 42 | + /// </summary> |
| 43 | + /// <param name="pageNumber">The number of the page being parsed.</param> |
| 44 | + /// <param name="inputBytes">The input bytes representing the content of the page.</param> |
| 45 | + /// <param name="log">The logger instance for recording parsing-related information.</param> |
| 46 | + /// <returns>A read-only list of graphics state operations extracted from the page content.</returns> |
| 47 | + /// <exception cref="ArgumentNullException"> |
| 48 | + /// Thrown if <paramref name="inputBytes"/> or <paramref name="log"/> is <c>null</c>. |
| 49 | + /// </exception> |
| 50 | + /// <exception cref="InvalidOperationException"> |
| 51 | + /// Thrown if the parsing process encounters an invalid or unsupported token. |
| 52 | + /// </exception> |
26 | 53 | public IReadOnlyList<IGraphicsStateOperation> Parse( |
27 | 54 | int pageNumber, |
28 | 55 | IInputBytes inputBytes, |
|
0 commit comments