PdfSharpCore
PdfSharpCore copied to clipboard
Exception on retrieving specific page: "GetInteger: Object is not an integer"
System.InvalidCastException: GetInteger: Object is not an integer.
at PdfSharpCore.Pdf.PdfDictionary.DictionaryElements.GetInteger(String key, Boolean create)
at PdfSharpCore.Pdf.PdfDictionary.DictionaryElements.GetInteger(String key)
at PdfSharpCore.Pdf.PdfPage..ctor(PdfDictionary dict)
at PdfSharpCore.Pdf.PdfPages.get_Item(Int32 index)
at MyCustomCode
the line where it is throwing is this line:
var inputDocumentPage = inputDocument.Pages[idx];
Upon investigation, the value in /Rotate is "null". This in turn is converted into a object of type PdfNull, which is not convertable in the GetInteger.