On 09/04/2020 00.46, Istvan Gabor wrote:
Hello:
I have a pdf file which is A5 paper size in landscape mode. When I open it in a pdf viewer (acroread, kdpf, okular) it is shown in landscape mode.
pdfinfo shows:
Producer: GPL Ghostscript 9.15 CreationDate: Wed Apr 8 23:20:35 2020 ModDate: Wed Apr 8 23:20:35 2020 Tagged: no Pages: 1 Encrypted: no Page size: 596 x 421 pts (A5) File size: 43191 bytes Optimized: no PDF version: 1.5
I would like to print this file, using lp or lpr command, onto the upper half of a portrait A4 paper, that is the A5 file is placed in landscape mode on a portrait A5 paper's upper half.
Whatever I try, the document is always printed A5 portrait mode on the A4 paper with the document's lower edge close to the bottom of the A4 paper.
I assume the document is one page only? Have you tried on another computer and/or printer? Perhaps add another page to the document, then use a concoction to print 2 pages on one sheet.
I tried these commands, and all gives exactly the same result:
lpr -P printer -o media=a4 file.pdf lpr -P printer -o media=a5 -o orientation-requested=4 file.pdf lpr -P printer -o media=a4 -o orientation-requested=4 file.pdf lpr -P printer -o media=a5 file.pdf lp -d printer -o media=a4 -o orientation-requested=4 file.pdf lp -d printer -o media=a5 -o orientation-requested=4 file.pdf lp -d printer -o media=a5 -o landscape file.pdf
Perhaps: lpr -P printer -o media=a4 -o landscape file.pdf I got good results when printing envelopes with this concoction: lpr -P cp1510n_ps -o PageSize=Custom.340x493 \ -o InputSlot=Tray1_Man envelope.pdf Of course, in your case we have to find first the a5 size in points. 148 x 210 mm 5,8 x 8,3 inches. cer@Telcontar:~> units 148mm pspoint * 419.52756 / 0.0023836336 cer@Telcontar:~> units 210mm pspoint * 595.27559 / 0.0016798942 cer@Telcontar:~> So it might be something like: lpr -P printer -o PageSize=Custom.596x419 file.pdf if not try reverse the sizes (I'm not clear on that). You could share the pdf with us (on susepaste.org). If the file is private, just generate a sample one we can use and try on our printers. -- Cheers / Saludos, Carlos E. R. (from 15.1 x86_64 at Telcontar)