diff --git a/src/Synercoding.FileFormats.Pdf/PackageDetails.props b/src/Synercoding.FileFormats.Pdf/PackageDetails.props
index ee3b493..94e8325 100644
--- a/src/Synercoding.FileFormats.Pdf/PackageDetails.props
+++ b/src/Synercoding.FileFormats.Pdf/PackageDetails.props
@@ -10,7 +10,7 @@
Synercoding.FileFormats.Pdf
Synercoding.FileFormats.Pdf
Contains classes which makes it easy to quickly create a pdf file.
- Added transparent and separation images support. Content streams will be flatedecode encoded. And overprint mode support is added.
+ Fixed broken zlib stream by removing explicit header and replacing deflate with zlib.
diff --git a/src/Synercoding.FileFormats.Pdf/PdfWriter.cs b/src/Synercoding.FileFormats.Pdf/PdfWriter.cs
index 4c72d97..40a1163 100644
--- a/src/Synercoding.FileFormats.Pdf/PdfWriter.cs
+++ b/src/Synercoding.FileFormats.Pdf/PdfWriter.cs
@@ -275,13 +275,10 @@ internal static Stream FlateEncode(Stream inputStream)
{
var outputStream = new MemoryStream();
- outputStream.WriteByte(0x78);
- outputStream.WriteByte(0xDA);
-
inputStream.Position = 0;
- using (var flateStream = new DeflateStream(outputStream, CompressionLevel.SmallestSize, true))
+ using (var zlibStream = new ZLibStream(outputStream, CompressionLevel.SmallestSize, true))
{
- inputStream.CopyTo(flateStream);
+ inputStream.CopyTo(zlibStream);
}
outputStream.Position = 0;