I am currently trying to print a PDF via lpr
command. The issue is I am able to print, but half the data is missing.
Process
Chrome downloads the PDF into Downloads directory. I have a shell script that monitors the directory and prints any incoming document then deletes it.
The printout should be in A5 size, so I use the command lpr -o media=A5 -o fit-to-page some_file.pdf
.
Issue
It prints, but the document is printed only half (let's say 30% of the content is missing from the left/A5 setting for printer is to put the page at the center of the printer).
I did some digging and found out the PDF and normal documents are treated differently by the printer.
One way is to put the printer hardware to A4 and put the paper to the left which seems to work. But this is a bad solution for me. When I try to print the PDF from Chrome or Evince, I put the printer hardware and software setting to A5 and it seems to work without any issue.
Any Suggestion to fix this is highly appreciated .