mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-04-05 20:55:01 +08:00
handle completely null content #243
This commit is contained in:
parent
be9fd4b071
commit
9d99ac4e9b
@ -8,6 +8,7 @@
|
|||||||
using Filters;
|
using Filters;
|
||||||
using Geometry;
|
using Geometry;
|
||||||
using Graphics;
|
using Graphics;
|
||||||
|
using Graphics.Operations;
|
||||||
using Logging;
|
using Logging;
|
||||||
using Parts;
|
using Parts;
|
||||||
using Tokenization.Scanner;
|
using Tokenization.Scanner;
|
||||||
@ -87,10 +88,18 @@
|
|||||||
|
|
||||||
UserSpaceUnit userSpaceUnit = GetUserSpaceUnits(dictionary);
|
UserSpaceUnit userSpaceUnit = GetUserSpaceUnits(dictionary);
|
||||||
|
|
||||||
PageContent content = default(PageContent);
|
PageContent content;
|
||||||
|
|
||||||
if (!dictionary.TryGet(NameToken.Contents, out var contents))
|
if (!dictionary.TryGet(NameToken.Contents, out var contents))
|
||||||
{
|
{
|
||||||
|
content = new PageContent(EmptyArray<IGraphicsStateOperation>.Instance,
|
||||||
|
EmptyArray<Letter>.Instance,
|
||||||
|
EmptyArray<PdfPath>.Instance,
|
||||||
|
EmptyArray<Union<XObjectContentRecord, InlineImage>>.Instance,
|
||||||
|
EmptyArray<MarkedContentElement>.Instance,
|
||||||
|
pdfScanner,
|
||||||
|
filterProvider,
|
||||||
|
resourceStore);
|
||||||
// ignored for now, is it possible? check the spec...
|
// ignored for now, is it possible? check the spec...
|
||||||
}
|
}
|
||||||
else if (DirectObjectFinder.TryGet<ArrayToken>(contents, pdfScanner, out var array))
|
else if (DirectObjectFinder.TryGet<ArrayToken>(contents, pdfScanner, out var array))
|
||||||
|
Loading…
Reference in New Issue
Block a user