mirror of
https://github.com/cyanfish/naps2.git
synced 2024-09-11 15:26:55 +03:00
parent
b1736fdd71
commit
8e3ea2a4d8
@ -21,6 +21,9 @@ namespace NAPS2.Pdf;
|
||||
/// </summary>
|
||||
public class PdfExporter
|
||||
{
|
||||
private const int PDF_VERSION_14 = 14;
|
||||
private const int PDF_VERSION_17 = 17;
|
||||
|
||||
private readonly ScanningContext _scanningContext;
|
||||
private readonly ILogger _logger;
|
||||
|
||||
@ -312,6 +315,12 @@ public class PdfExporter
|
||||
PdfAHelper.CreateXmpMetadata(document, compat);
|
||||
}
|
||||
|
||||
document.Version = compat switch
|
||||
{
|
||||
PdfCompat.PdfA2B or PdfCompat.PdfA3B or PdfCompat.PdfA3U => PDF_VERSION_17,
|
||||
_ => PDF_VERSION_14
|
||||
};
|
||||
|
||||
var stream = new MemoryStream();
|
||||
document.Save(stream);
|
||||
return stream;
|
||||
|
Loading…
Reference in New Issue
Block a user