title: Printing PDF files with Python
body: <p>I am trying to open a pdf file, print the file, and close Adobe Acrobat in Python 2.7.</p>
  
  <pre><code>import os
  
  fd = os.startfile("temp.pdf", "print")
  os.close(fd)
  </code></pre>
  
  <p>After running the code, I get the following error on the <code>os.close(fd)</code> line:</p>
  
  <pre><code>TypeError: an integer is required
  </code></pre>