mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-07-15 17:40:58 +08:00
DecodeParms might be an indirect reference
This commit is contained in:
parent
30039aa6d3
commit
9f6dd5375d
@ -10,7 +10,8 @@
|
|||||||
using Graphics.Colors;
|
using Graphics.Colors;
|
||||||
using Graphics.Core;
|
using Graphics.Core;
|
||||||
using Tokenization.Scanner;
|
using Tokenization.Scanner;
|
||||||
using Tokens;
|
using Tokens;
|
||||||
|
using UglyToad.PdfPig.Parser.Parts;
|
||||||
using Util;
|
using Util;
|
||||||
|
|
||||||
internal static class XObjectFactory
|
internal static class XObjectFactory
|
||||||
@ -99,7 +100,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var decodedBytes = supportsFilters ? new Lazy<IReadOnlyList<byte>>(() => xObject.Stream.Decode(filterProvider, pdfScanner))
|
var decodeParams = dictionary.GetObjectOrDefault(NameToken.DecodeParms, NameToken.Dp);
|
||||||
|
if (decodeParams is IndirectReferenceToken refToken)
|
||||||
|
{
|
||||||
|
dictionary = dictionary.With(NameToken.DecodeParms, pdfScanner.Get(refToken.Data).Data);
|
||||||
|
}
|
||||||
|
|
||||||
|
var streamToken = new StreamToken(dictionary, xObject.Stream.Data);
|
||||||
|
|
||||||
|
var decodedBytes = supportsFilters ? new Lazy<IReadOnlyList<byte>>(() => streamToken.Decode(filterProvider, pdfScanner))
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
var decode = EmptyArray<decimal>.Instance;
|
var decode = EmptyArray<decimal>.Instance;
|
||||||
|
Loading…
Reference in New Issue
Block a user