From 25fefef893180a726ee0c661089f58d433b0a0f7 Mon Sep 17 00:00:00 2001 From: matu6968 Date: Fri, 1 Nov 2024 14:14:42 +0100 Subject: [PATCH] make the script fit to page images (later i will make it customizable from the web ui) --- eprintcloned | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eprintcloned b/eprintcloned index d53c08b..b180e95 100755 --- a/eprintcloned +++ b/eprintcloned @@ -14,20 +14,20 @@ for file in "$1"; do echo $imagelogmsg cp $1 $HOME/imagelog echo "Printing image/document" - lpr -o portrait -o media=A4 $1 -P $printer # if you are using a different printer that requires different commands to print, change this part of the code. + lpr -o portrait -o media=A4 -o fit-to-page $1 -P $printer # if you are using a different printer that requires different commands to print, change this part of the code. else echo "Printing image/document" - lpr -o portrait -o media=A4 $1 -P $printer # if you are using a different printer that requires different commands to print, change this part of the code. + lpr -o portrait -o media=A4 -o fit-to-page $1 -P $printer # if you are using a different printer that requires different commands to print, change this part of the code. fi elif [[ "$mime_type" == text/* ]]; then if [[ $2 == log ]]; then echo $imagelogmsg cp $1 $HOME/imagelog echo "Printing text" - lpr -o portrait -o media=A4 $1 -P $printer # if you are using a different printer that requires different commands to print, change this part of the code. + lpr -o portrait -o media=A4 -o fit-to-page $1 -P $printer # if you are using a different printer that requires different commands to print, change this part of the code. else echo "Printing text" - lpr -o portrait -o media=A4 $1 -P $printer # if you are using a different printer that requires different commands to print, change this part of the code. + lpr -o portrait -o media=A4 -o fit-to-page $1 -P $printer # if you are using a different printer that requires different commands to print, change this part of the code. fi else echo "Error: Invalid file type or, ePrint clone only accepts the following MIME types: text/*, image/*, application/pdf"