title: Pdf overlaying not working
body: <p>I have been looking for a solution for this problem : I have two landscape-oriented A3 pdfs with images and I want to overlay them in a manner that the resulting pdf contains both images merged into one as if one of them was a watermark, but with the same density. Think of it as if about printing two different pdfs on one A3 sheet of paper, I want to get exactly that effect.</p>
  
  <p>In other words - just came up with a way to express it - I would like to overlay two pdfs and for the upper layer, make all the "white" area transparent.</p>
  
  <p>Basically, I just followed steps in any solution from this question:</p>
  
  <p><a href="https://stackoverflow.com/questions/501723/overlay-one-pdf-or-ps-file-on-top-of-another">overlay one pdf or ps file on top of another</a></p>
  
  <p>The pdftk didn't work in my case. The resulting PDF displayed the pdf that was on the top layer, but the bottom layer was not seen. So, I proceeded to programming solution and downloaded pyPdf.</p>
  
  <p>The code from the site was exactly an implementation of the desired solution:</p>
  
  <pre><code> from pyPdf import PdfFileReader,PdfFileWriter
   output = PdfFileWriter()
   input1 = PdfFileReader(file("b.pdf", "rb"))
  
   page1 = input1.getPage(0)
   watermark = PdfFileReader(file("a.pdf", "rb"))
   page1.mergePage(watermark.getPage(0))
  
   output.addPage(page1)
  
   outputStream = file("c.pdf", "wb")
   output.write(outputStream)
   outputStream.close()
  </code></pre>
  
  <p>However, the result was the same as after using pdftk.</p>
  
  <p>What am I doing wrong? Maybe this is not pdf merging, multimerging, stamping, overlaying etc but something else? If so, how is it called? </p>