From eaf0c5da6e202aea25a891184671f2c76ee860a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Osman=20Tun=C3=A7elli?= Date: Tue, 28 Sep 2021 04:51:37 +0300 Subject: [PATCH] PDF/A-1 doesn't allow transparency. --- src/UglyToad.PdfPig/Writer/PdfPageBuilder.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/UglyToad.PdfPig/Writer/PdfPageBuilder.cs b/src/UglyToad.PdfPig/Writer/PdfPageBuilder.cs index da2de186..a16230e9 100644 --- a/src/UglyToad.PdfPig/Writer/PdfPageBuilder.cs +++ b/src/UglyToad.PdfPig/Writer/PdfPageBuilder.cs @@ -495,7 +495,7 @@ IndirectReferenceToken smaskReference = null; - if (png.HasAlphaChannel) + if (png.HasAlphaChannel && documentBuilder.ArchiveStandard != PdfAStandard.A1B && documentBuilder.ArchiveStandard != PdfAStandard.A1A) { var smaskData = new byte[data.Length / 3]; for (var rowIndex = 0; rowIndex < png.Height; rowIndex++) @@ -917,4 +917,4 @@ } -} \ No newline at end of file +}