Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue reading valid PDF file, GetReal: Object is not a number. #101

Open
decryphe opened this issue Aug 27, 2019 · 1 comment
Open

Issue reading valid PDF file, GetReal: Object is not a number. #101

decryphe opened this issue Aug 27, 2019 · 1 comment
Labels

Comments

@decryphe
Copy link

Hello Everyone

There is a crash in PdfSharp when appending some of my PDF files to a longer master file. Attached is a minimum working sample that triggers this bug. Stacktrace is as follows:
Unhandled Exception: System.InvalidCastException: GetReal: Object is not a number. at PdfSharp.Pdf.PdfArray.ArrayElements.GetReal(Int32 index) at PdfSharp.Pdf.PdfDictionary.DictionaryElements.GetRectangle(String key, Boolean create) at PdfSharp.Pdf.PdfPage.get_MediaBox() at PdfSharp.Pdf.PdfPage.WriteObject(PdfWriter writer) at PdfSharp.Pdf.PdfDocument.DoSave(PdfWriter writer) at PdfSharp.Pdf.PdfDocument.Save(Stream stream, Boolean closeStream) at PdfSharp.Pdf.PdfDocument.Save(String path) at IssueSubmission.Program.Main() in C:\Users\user\Downloads\PDFsharp-IssueSubmission\IssueSubmission\Program.cs:line 38

File is generated with WeasyPrint and sanitized with PDF-Xchange editor. Original WeasyPrint file doesn't work as well as sanitized version from PDF-Xchange.

PDFsharp-IssueSubmission.zip

@ThomasHoevel
Copy link
Member

Thanks for the feedback. Sorry it took so long.
Error will be fixed with PDFsharp 6.0.0-preview-3 coming this month or next month.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants