λ

Menu

  • Home
  • Archives
  • Tags
  • About Me
  • RSS
October 18, 2023

บันทึกการใช้คำสั่ง lpr

ปัญหาคือ ต้องการสั่งพิมพ์ไฟล์ pdf หลายๆ ไฟล์ในโฟลเดอร์ ผ่าน lpr ซึ่งบางไฟล์มีปัญหาพิมพ์ออกเครื่อง print มาแล้วไม่เต็มหน้าหรือขนาดใหญ่เกิน A4

ซึ่งทั้งหมดนี้แก้ได้ผ่าน lpr โดยสิ่งที่ต้องการคือ

  • ขนาดกระดาษ A4
  • พิมพ์หน้าเดียว
  • พิมพ์เฉพาะขาว-ดำ

คำสั่งและ options ต่างๆ ที่ต้องการก็จะตามนี้

for f in *;
  do lpr -o ColorModel=KGray \
         -o PageSize=A4 \ 
         -o fit-to-page \
         -o sides=one-sided "$f";
done

Reference

  • How can I force single sided printing with lpr?

Tags: linux lpr

ใช้ Java Calendar class ใน Clojure »
Glosa static integration

{{ comments.length }} comments

New comment

Reply  {{ formatEllipsisAuthor(replyComment.author) }}

I accept the policy of Data Protection.

Write the first comment


Copyright © 2023 Phondanai Khanti

Powered by Cryogen | Free Website Template by Download Website Templates