title: Resize pdf pages in Python
body: <p>I am using python to crop pdf pages.
  Everything works fine, but how do I change the page size(width)?</p>
  
  <p>This is my crop code:</p>
  
  <pre><code>input = PdfFileReader(file('my.pdf', 'rb'))
  p = input.getPage(1)
  (w, h) = p.mediaBox.upperRight
  p.mediaBox.upperRight = (w/4, h)
  output.addPage(p)
  </code></pre>
  
  <p>When I crop pages, I need to resize them as well, how can I do this?</p>