ststeiger / PdfSharpCore

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

no version set in PdfDocument(Stream s) constructor #384

Open snpz opened 11 months ago

snpz commented 11 months ago

Hi.

I believe I found a llittle bug: When creating a document from scratch using the stream-constructor the _version field isn't set to 14 as in the other ctors. (PdfReader fails to open these)

        public PdfDocument(Stream outputStream)
        {
            //PdfDocument.Gob.AttatchDocument(Handle);

            _creation = DateTime.Now;
            _state = DocumentState.Created;
            Initialize();
            Info.CreationDate = _creation;

            _outStream = outputStream;
        }

If you need more info or something just let me know. Thanks for working on this project!