PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Mon Dec 09, 2024 10:12 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Wed Sep 29, 2021 11:44 am 
Offline

Joined: Wed Sep 29, 2021 11:41 am
Posts: 1
When opening a PDF file which is > 2GB in size, the following exception is thrown
Code:
Unhandled Exception: System.ArgumentOutOfRangeException: Non-negative number required.
Parameter name: value
   at System.IO.FileStream.set_Position(Int64 value)
   at PdfSharp.Pdf.IO.Lexer.ReadRawString(Int32 position, Int32 length)
   at PdfSharp.Pdf.IO.Parser.ReadTrailer()
   at PdfSharp.Pdf.IO.PdfReader.Open(Stream stream, String password, PdfDocumentOpenMode openmode, PdfPasswordProvider passwordProvider)
   at PdfSharp.Pdf.IO.PdfReader.Open(Stream stream, PdfDocumentOpenMode openmode)


From the stack trace it looks like PDFSharp internally is only working with 32bit ints which would lead to an overflow with this file size.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group