From 7c15149205a858337f5a8dc1ed1d7fef299b8368 Mon Sep 17 00:00:00 2001 From: escesare Date: Wed, 12 Oct 2022 21:00:19 -0400 Subject: [PATCH] Don't close stream in FileRef.write_to_stream() to comply with Adobe API --- src/adobe/pdfservices/operation/internal/io/file_ref_impl.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/adobe/pdfservices/operation/internal/io/file_ref_impl.py b/src/adobe/pdfservices/operation/internal/io/file_ref_impl.py index 383e838..1178f21 100644 --- a/src/adobe/pdfservices/operation/internal/io/file_ref_impl.py +++ b/src/adobe/pdfservices/operation/internal/io/file_ref_impl.py @@ -59,7 +59,6 @@ def write_to_stream(self, writer_stream: BufferedWriter): writer_stream.write(buffer) if len(buffer) < io.DEFAULT_BUFFER_SIZE: break - writer_stream.close() self._logger.info("Writing file at {tmp_file_path} to writer stream".format(tmp_file_path=self._file_path)) else: self._logger.error(