Skip to content

Instantly share code, notes, and snippets.

@arpitjindal97
Last active June 8, 2018 18:20
Show Gist options
  • Save arpitjindal97/5c33ad484cfd2f97942d1db7b5f17d63 to your computer and use it in GitHub Desktop.
Save arpitjindal97/5c33ad484cfd2f97942d1db7b5f17d63 to your computer and use it in GitHub Desktop.
montage $(for f in *;do for j in {0..4};do echo $f; done done) -tile 6x7 -auto-orient -geometry '425x520!+8+8' -page A4 ../arpit.pdf
echo "# To set default option of printer"
echo "lpoptions -d EPSON_L210_Series \n"
echo "# To print pdf"
echo "look at -P "
echo "lp -d HP_LaserJet_M1005 -P 4-4 -o media=a4 -o scaling=100 -o fit-to-page ../arpit.pdf"
# full page image aspect ratio ignored
# convert image1.jpeg image2.jpeg single.pdf
# To convert pdf to image at 300dpi
convert -verbose -density 300 -trim source.pdf -quality 100 -flatten -sharpen 0x1.0 output.jpeg
# merge pdf
pdfunite one.pdf two.pdf merged.pdf
# compress pdf
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile=out.pdf in.pdf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment