Class PdfOutputStream

All Implemented Interfaces:
Closeable, Flushable, AutoCloseable
Direct Known Subclasses:
PdfWriter

public class PdfOutputStream extends HighPrecisionOutputStream<PdfOutputStream>
  • Field Details

    • document

      protected PdfDocument document
      Document associated with PdfOutputStream.
    • crypto

      protected PdfEncryption crypto
      Contains the business logic for cryptography.
  • Constructor Details

    • PdfOutputStream

      public PdfOutputStream (OutputStream outputStream)
      Create a pdfOutputSteam writing to the passed OutputStream.
      Parameters:
      outputStream - Outputstream to write to.
  • Method Details

    • write

      public PdfOutputStream write (PdfObject pdfObject)
      Write a PdfObject to the outputstream.
      Parameters:
      pdfObject - PdfObject to write
      Returns:
      this PdfOutPutStream
    • checkEncryption

      protected boolean checkEncryption (PdfStream pdfStream)
    • containsFlateFilter

      protected boolean containsFlateFilter (PdfStream pdfStream)
    • updateCompressionFilter

      protected void updateCompressionFilter (PdfStream pdfStream)
    • updateCryptFilterForEmbeddedFilesOnlyMode

      protected void updateCryptFilterForEmbeddedFilesOnlyMode (PdfStream pdfStream)
      Adds required Filter and DecodeParms to the pdf stream if the stream is embedded file stream and only embedded files are expected to be encrypted. See EncryptionConstants.EMBEDDED_FILES_ONLY.
      Parameters:
      pdfStream - embedded file pdf stream.
    • decodeFlateBytes

      protected byte[] decodeFlateBytes (PdfStream stream, byte[] bytes)