-
Notifications
You must be signed in to change notification settings - Fork 282
Closed
Labels
Description
Unhandled exception. UglyToad.PdfPig.Core.PdfDocumentFormatException: The dictionary did not contain a number with the key /Size. Dictionary way: .
at UglyToad.PdfPig.Util.DictionaryTokenExtensions.GetInt(DictionaryToken dictionaryToken, NameToken name)
at UglyToad.PdfPig.CrossReference.TrailerDictionary..ctor(DictionaryToken dictionary, Boolean isLenientParsing)
at UglyToad.PdfPig.CrossReference.CrossReferenceTableBuilder.Build(Int64 firstCrossReferenceOffset, Int64 offsetCorrection, Boolean isLenientParsing, ILog log)
at UglyToad.PdfPig.Parser.FileStructure.CrossReferenceParser.Parse(IInputBytes bytes, Boolean isLenientParsing, Int64 crossReferenceLocation, Int64 offsetCorrection, IPdfTokenScanner pdfScanner, ISeekableTokenScanner tokenScanner)
at UglyToad.PdfPig.Parser.PdfDocumentFactory.OpenDocument(IInputBytes inputBytes, ISeekableTokenScanner scanner, ParsingOptions parsingOptions)
at UglyToad.PdfPig.Parser.PdfDocumentFactory.Open(IInputBytes inputBytes, ParsingOptions options)
at UglyToad.PdfPig.Parser.PdfDocumentFactory.Open(Byte[] fileBytes, ParsingOptions options)
at UglyToad.PdfPig.Parser.PdfDocumentFactory.Open(String filename, ParsingOptions options)
at UglyToad.PdfPig.PdfDocument.Open(String filePath, ParsingOptions options)
I encounter the above exception when processing the attached file.
I tried with and without explicit ParsingOptions
.
ParsingOptions options = new ParsingOptions
{
SkipMissingFonts = true,
UseLenientParsing = true
};
using (PdfDocument document = PdfDocument.Open(filename, options))
{
...
}
BobLd