How can I print half of a page to a pdf file?

How To Print a Selected Portion of a PDF File

Using the native Adobe Acrobat Reader

  1. Make sure the basic toolbar is visible by right clicking on a blank area of the toolbar, and placing a check mark next to Basic if it is not already enabled.

  2. Find the "Snapshot Tool" on the Basic toolbar and select it.

  3. Drag a box around the area you want to print. A message will alert you that the selection has been copied to the clipboard. Click OK and you will see a dashed line around the area you just selected.

  4. Click Print.

  5. In the print dialog, set the print rage to "Selected graphic."

  6. If you want to print the selection at its intended size, set Page Scaling to "None."

  7. If you want the selection to fill the paper, set the page scaling to "Fit to paper." You may need to check the "Auto-Rotate and Center" check box to maximize paper usage.

  8. When you are satisfied with the preview, click OK to print the document.

References

  • How To Print a Selected Portion of a PDF File - about.com

If you only need to do this once and for a single page, I would just open the PDF with GIMP and copy the top half:

gimp 150264785-test-pdf.pdf

That will bring up a screen asking you to chose the pages you want to import:

enter image description here

Import the 1st page, then simply use GIMP to select and cut the region you are interested in, paste it as a new image and export to PDF again.


That's half of un2up (modulo a rotation). So, with Python and its pyPdf library:

#!/usr/bin/env python
import copy, sys
from pyPdf import PdfFileWriter, PdfFileReader
input = PdfFileReader(sys.stdin)
output = PdfFileWriter()
for p in [input.getPage(i) for i in range(0,input.getNumPages())]:
    (w, h) = p.mediaBox.upperLeft
    p.mediaBox.lowerLeft = (w, h/2)
    output.addPage(p)
output.write(sys.stdout)

Tags:

Pdf

Printing