ststeiger / PdfSharpCore

Port of the PdfSharp library to .NET Core - largely removed GDI+ (only missing GetFontData - which can be replaced with freetype2)
Other
1.04k stars 231 forks source link

Opening a pdf causes the ModDate to update #365

Open Malikazz opened 1 year ago

Malikazz commented 1 year ago

Issue

Opening a PDF with PdfSharpCore causes the modification date to change before any modification has been made. This makes checking the modification date to see if its been modified pointless.

Is there a method where this property can be read without modifying it?

Should the property be changing before an modification is made? Or is that a bug.

I would personally expect that the modification tag would only be updated during a save.

Replication

Create a valid PDF, save it, open it and compare ModDate and CreationDate, ModDate wont match creation date.

Malikazz commented 1 year ago

Found the read only option reading the code I think maybe its still odd mod date is changed before the save but perhaps it has a reason.