title: PyPDF2 compression
body: <p>I am struggling to compress my merged pdf's using the PyPDF2 module. this is my attempt based on <a href="http://www.blog.pythonlibrary.org/2012/07/11/pypdf2-the-new-fork-of-pypdf/" rel="noreferrer">http://www.blog.pythonlibrary.org/2012/07/11/pypdf2-the-new-fork-of-pypdf/</a></p>
  
  <pre><code>import PyPDF2
  path = open('path/to/hello.pdf', 'rb')
  path2 = open('path/to/another.pdf', 'rb')
  merger = PyPDF2.PdfFileMerger()
  merger.append(fileobj=path2)
  merger.append(fileobj=path)
  pdf.filters.compress(merger)
  merger.write(open("test_out2.pdf", 'wb'))
  </code></pre>
  
  <p>The error I receive is </p>
  
  <pre><code>TypeError: must be string or read-only buffer, not file
  </code></pre>
  
  <p>I have also tried to compressing the pdf after the merging is complete. I am basing my failed compression on what file size I got after using PDFSAM with compression.
  Any thoughts? Thanks.</p>