ststeiger / PdfSharpCore

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

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

Open snpz opened 1 year ago

snpz commented 1 year 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!