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

Supporting Pdf Version 2.0 #359

Closed lht0502 closed 1 year ago

lht0502 commented 1 year ago

There is an error "The specified file has no valid PDF file header." when trying to upload the PDF file with version 2.0.

Is this library going to support the PDF Version 2.0?

Thanks.

ststeiger commented 1 year ago

It supports all pdf versions that pdfsharp supports.

PDFsharp is a popular open-source library for working with PDF files in .NET applications. It supports the following PDF versions: PDF 1.0 PDF 1.1 PDF 1.2 PDF 1.3 PDF 1.4 PDF 1.5 PDF 1.6 PDF 1.7 (ISO 32000-1) Note that PDFsharp does not support the latest PDF 2.0 standard, which was released in 2017. PDF 2.0 introduces several new features and improvements over previous versions, including support for transparency in vector graphics, enhanced digital signatures, and more. However, PDF 1.7 is still widely used and supported by most PDF viewers and tools.

It's also worth noting that PDFsharp provides a higher-level API called MigraDoc that can be used to create PDF documents with more advanced features, such as tables, paragraphs, and images. MigraDoc uses PDFsharp as its PDF rendering engine and supports the same PDF versions as PDFsharp.

ststeiger commented 1 year ago

In other words, it currently does not support pdf 2.0. You can always submit a pull request and add pdf 2.0 support.