2

I have a PDF of which I only want to print the top half (there are two labels in the PDF, but I only want to print one and save the label paper instead of wasting one).

I can use the Acrobat snapshot tool to just select the part of the document to print, and that's fine.

However... when I go to print this snapshot it is centered on the printed page.

Is there a way to tell it to print at the top-left (or anywhere else on the physical page)?

Many thanks!


Edit: here's a screenshot of the print dialog:

Print dialog screenshot

caponica
  • 3,788
  • 4
  • 32
  • 48
  • 1
    So you want to use the full-sized paper and print only the top half? Do you want to re-use the bottom half of the paper for another print? – Kurt Pfeifle Jan 07 '15 at 17:29
  • 1
    Yes - exactly. Print only the top half and re-use the bottom half of the paper (a label) for another print. – caponica Jan 11 '15 at 14:04

3 Answers3

3

For anyone facing the same challenge... The Adobe crop tool always centers the printout for me, so I slightly modified a python script based on this answer: https://unix.stackexchange.com/a/373287

import copy, sys
from PyPDF2 import PdfFileWriter, PdfFileReader
input = PdfFileReader(open(sys.argv[1], 'rb'))
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(open(sys.argv[1][:-4] + '_halved.pdf', 'wb'))

This script takes a PDF as input, crops the top part and saves it as a new PDF in the same folder. You need to install python as well as PyPDF2 (pip install PyPDF2).

I use it quite often to cut DHL parcel labels in half to A5, so I can print it on A4 sheets with 2 self-adhesive A5 labels on it without wasting the second label. To simplify this a bit more, I added the script to the context menu using these instructions: Add menu item to windows context menu only for specific filetype

So I can now download the parcel label, right click -> CropTop -> print the new PDF.

Trevor
  • 341
  • 2
  • 9
0

For the top half, it is not as difficult.

If necessary, use the Crop tool to crop to the top half of the page.

In the Print dialog, deactivate the automatic rotation and centering, and this should get the contents in the top half of the page. Verify with the little thumbnail preview in the Print dialog.

Max Wyss
  • 3,549
  • 2
  • 20
  • 26
  • Hi, I cannot find the "automatic rotation and centering" option anywhere... I've added a screenshot of the print dialog, but if it's in acrobat somewhere please let me know! – caponica Jan 11 '15 at 14:12
  • In Acrobat XI, it is "Auto rotate portrait/landscape" in the Print dialog, in the Orientation section. Even if "centered" is not mentioned, if you have this selection, it will center. – Max Wyss Jan 12 '15 at 23:00
  • I have Adobe Acrobat Reader DC 2015.010.20059 and my print dialog looks just like the one in the screenshot. There's orientation options but when I switch from "Auto/portrait/landscape" to "Portrait" the label is still centered in the page, not aligned to the top. Is there no way to tell Acrobat Reader to stop centering? – primehalo Feb 22 '16 at 20:40
0

For anyone needing to use v3 of the PDF library used in Trevor's answer above, the equivalent python code is:

import copy, sys
from PyPDF2 import PdfWriter, PdfReader
input = PdfReader(open(sys.argv[1], 'rb'))
output = PdfWriter()
for p in [input.pages[i] for i in range(0, len(input.pages))]:
    (w, h) = p.mediabox.upper_left
    p.mediabox.lower_left = (w, h/2)
    output.add_page(p)
output.write(open(sys.argv[1][:-4] + '_halved.pdf', 'wb'))
Oliver Mooney
  • 155
  • 1
  • 7