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

21,039

Solution 1

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

Solution 2

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.

Solution 3

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)
Share:
21,039

Related videos on Youtube

ags9
Author by

ags9

Updated on September 18, 2022

Comments

  • ags9
    ags9 almost 2 years

    I have a one page PDF file with scanned documents. I need to send only top half of this document to someone. How can I generate a new PDF document with only the top half of the original page, without losing details?

    • Admin
      Admin over 10 years
      Probably not what you want but via acrobat reader: graphicssoft.about.com/od/adobe/ht/printportionpdf.htm
    • Admin
      Admin over 10 years
      What utility are you using to view the PDF?
    • Admin
      Admin over 10 years
      I was actually using acrobat reader among others, and the way @sim proposed did the job! I will accept your answer, if you create one.
    • Admin
      Admin over 10 years
      OK I'll write it up
    • Admin
      Admin about 7 years
      go low tech - print it, cut it in half, scan the half you want, send it.
  • Gilles 'SO- stop being evil'
    Gilles 'SO- stop being evil' over 10 years
    I can't find a snapshot tool in evince. Are these instructions for okular?
  • slm
    slm over 10 years
    @Gilles - thanks, they are for Adobe Reader, I've added a comment at the top about this.
  • slm
    slm over 10 years
    @Gilles - incidentally I stopped looking for alternatives after the OP said he was using Adobe Reader, but another way would probably a good add to this Q just for completeness if you know of one.
  • Gilles 'SO- stop being evil'
    Gilles 'SO- stop being evil' over 10 years
    I basically did that two years ago — just needs a little tweak.
  • slm
    slm over 10 years
    @Gilles - you have a time machine, don't you?