Lpr send to print a4 format and print letter format

Hi! How we are?

I have an A4 PDF in my server, and i must send it to phisically printer.
I use the comand:

lpr -P printername -o media=A4 archive.pdf

And the printer prints it in letter format, i don't know why.

�Have ideas or solution?

Thanks, my best regards.

Assuming that the printer has two input trays, one for A4 and one for letter size.
Does the installed print driver use the correct command (pcl5?) to select the A4 tray.
I once phoned HP and asked for the commands to select the trays on a MFP printer, and they could not tell me. I had to try all of them (about 20) one a time.

1 Like

Hi jgt, thanks for your answer, yes, has two trays. The PDF printed is generated on A4 paper (A4 tray) but with Letter Format, the margins are misplaced and the paper size cut the image .
The PDF in windows has a 210 x 297 dimension , A4. It's rare.

If the printer supports postscript, you might try using pdf2ps first, then sending the postscript file to the printer.

1 Like

Hi jgt, how are you?, but i wanna print the PDF, because it has a Barcode.

I modified the ppd, to A4 format, but the printed paper has a letter format.

I don't know why, i dont have any ideas :confused::confused::confused::confused:

You can't send a pdf file to the printer using lpr, unless the destination print driver has the ability to convert pdf to a print stream suitable for the printer.
If your printer supports postscript, you can pipe the pdf file through pdf2ps to convert the pdf file. The bar code will still print.

1 Like

jgt, i sent to the printer the postscript file, but the format is the same like the pdf and it's hasn't the barcode.

The margins in postscript and pdf paper printer are to different with the windows paper printer.

Thanks a lot.

---------- Post updated at 09:58 AM ---------- Previous update was at 09:32 AM ----------

I have solved the problem with this command:

lp -d "printername"-o fitplot -o pdf-page=A4 "archive PDF"

Thanks a lot!

1 Like