Closed AGlezB closed 1 year ago
Did you add any pages? Please try the PDF created by the Hello World sample. See also: http://pdfsharp.net/wiki/IssueSubmissions.ashx http://pdfsharp.net/wiki/HelloWorld-sample.ashx
We have a WinForms app that uses SSRS to generate a bunch of PDF reports then PDFSharp to merge those in a single PDF file. Then our client requested to merge some of those previusly merged files to email their clients a single file.
For exalmple the app creates a bunch of individual reports for 2019, say Billing, Expenses, Raw Material usage, Production, etc. for single client and then merges those in a single PDF like {ClientID}_{Yeay}.pdf. Then our client says they want 2019 and 2018 in a single file, so we grab the existing files and merge them before sending them to their client and here we failed to merge {ClientID}_2018.pdf and {ClientID}_2019.pdf because of the issue with the version.
Unfortunately I cannot provide the code or a PDF sample since everything is covered in NDAs and whatnot.
EDIT: Ok, this sould be safe
That is a partial screenshot of Foxit Reader's file poperties.
That one fails to open with PdfReader.Open()
This one was generated with the same code but with one additional LOC setting version to 1.4
PdfReader.Open()
has no issue with it.
This should also be safe
PDFsharp: 1.50.5147
If you create a new PDF using
new PdfDocument()
, save it and try to open it withPdfReader.Open()
it fails withFile is not a valid PDF
file.
Looking at the document properties I noticed this:
PdfReader.Open()
works fine ffter settingpdf.Version = 14
. I didn't try other versions.This is only a bug because PDFSharp cannot open the files created with the default settings. Please consider changing the default version to something
PdfReader.Open()
can handle.