যে কেউ 1 বা 2 পিজি পিডিএফ নিতে এবং ল্যান্ডস্কেপ ভিউতে পাশের পাশাপাশি 2 কপি সহ পিডিএফে পরিণত করতে চান ( প্রিন্টিং ফ্লাইয়ারদের জন্য দুর্দান্ত ), এটি করুন:
1 বা 2 পিজি পিডিএফ ইনপুটটিকে এমন আউটপুটে পরিণত করুন যাতে এই পৃষ্ঠাগুলির সদৃশ অনুলিপি রয়েছে (1-পিজি পিডিএফ -> 2-পিজি পিডিএফ, 2-পিজি পিডিএফ -> 4-পিজি পিডিএফ, ইত্যাদি):
pdfunite in.pdf in.pdf out.pdf
প্রিন্টিং ফ্লাইয়ারদের জন্য প্রতিলিপি-অনুলিপি পিডিএফটিকে 2-পৃষ্ঠাগুলি-প্রতি-পাশ-ইন-ল্যান্ডস্কেপ-ভিউ পিডিএফ-তে একত্রিত করুন:
pdfnup out.pdf
বা সমস্ত একক লাইনে:
pdfunite in.pdf in.pdf out.pdf && pdfnup out.pdf
নোট out.pdfএটি ইনপুট হয় pdfnup। এর ফলে প্রাপ্ত আউটপুট ফাইলটিকে pdfnup" আউট-নুপ.পিডিএফ " বলা হবে ।
এছাড়াও, pdfnupকমান্ডের আউটপুটটি দেখুন এবং আপনি যে কমান্ডটি চালাচ্ছেন তার ভার্বোজ ফর্মটি দেখতে পাবেন, এটি আপনাকে যে বিকল্পগুলি দিয়ে যেতে পারে তার কিছুটা অন্তর্দৃষ্টি দেয়। দৃশ্যত ফণা অধীন pdfnupব্যবহার pdfjamকরে:
পিডিএফজাম: পিডিএফজামের এই রানের জন্য কার্যকর কল:
/usr/bin/pdfjam --suffix nup --nup '2x1' --landscape -- out.pdf -
উদাহরণ:
আসল পিডিএফ (পোর্ট্রেট ভিউতে 1 নিয়মিত পিজি ), " ইন.পিডিএফ ":

চূড়ান্ত পিডিএফ (ল্যান্ডস্কেপ ভিউতে 2 পৃষ্ঠার পাশাপাশি), " আউট-নুপ.পিডিএফ ":
- ফ্লাইয়ার হিসাবে পাস করার জন্য এখন মাঝখানে নীচের অংশে কেটে নেওয়া যেতে পারে

সাধারণ বাশ ফাংশন: make_flyer
একটি সহজ এবং সহজেই ব্যবহারযোগ্য-তেমন কমান্ডটি অ্যাক্সেস পেতে আপনার "~ / .bashrc" ফাইলের নীচে এই বাশ ফাংশনটি অনুলিপি করুন এবং আটকান make flyer:
# Description: outputs a landscape-oriented flyer pdf ("my/pdf/input--flyer.pdf") for each 1 or more pg input pdf ("my/pdf/input.pdf")
# - 1-pg input PDFs are converted to a 1-sided landscape, printable flyer that you cut down the center to make
# 2 flyers
# - 2-pg input PDFs are converted to a 2-sided landscape, printable flyer (flip on short edge when printing
# double-sided), and also cut down the middle to make 2 flyers
# - **3+ pg input PDFs**: using `pdfnup` directly in this case would make more sense, since this function will
# otherwise unneccessarily create 2 copies
# - 3 and 4-pg input PDFs are converted to a single piece of paper, double-sided, flipped on short edge, x 2 copies.
# No cutting is necessary
# - 5+ pg input PDFs simply require half as much paper to print is all since you get 2 pages per side of paper;
# they do NOT print like booklets, but rather just as a landscape-printed, flipped-on-short-edge bundle of pages
# (like a deck of slides). You get *2 copies* per print though, so just print half the pages.
make_flyer() {
num_args=$# # see: https://stackoverflow.com/questions/4423306/how-do-i-find-the-number-of-arguments-passed-to-a-bash-script/4423321#4423321
suffix="flyer"
loop_cnt=0
for inputpdf in "$@"
do
((loop_cnt++))
echo "==== CONVERTING PDF $loop_cnt OF $num_args ===="
echo " INPUT: \"$inputpdf\""
# Strip off the .pdf extension from the input path, while retaining the rest of the path
# - See: https://stackoverflow.com/questions/12152626/how-can-i-remove-the-extension-of-a-filename-in-a-shell-script/32584935#32584935
input_path_base="$(echo "$inputpdf" | rev | cut -f 2- -d '.' | rev)"
input_file_base="$(basename "$inputpdf" .pdf)"
temp_pdf="${input_path_base}-.pdf" # is "input_path_base-.pdf"
echo " OUTPUT: \"$(pwd)/${input_file_base}--${suffix}.pdf\""
# Convert a single 1-pg pdf into a temporary 2-pg pdf
pdfunite "$inputpdf" "$inputpdf" "$temp_pdf"
# Lay out the temporary 2-pg pdf into a side-by-side 1-sided flyer to print; creates "input_path_base--flyer.pdf"
# Note that `pdfnup` places the output from this operation in the location from where you call this script
# (ie: in your `pwd` [Present Working Directory])!--NOT the location where temp_pdf is located!
pdfnup "$temp_pdf" --suffix $suffix
# Delete the temporary 2-pg pdf, called "input_path_base-.pdf", thereby leaving only the original
# "input_path_base.pdf" and the new "input_path_base--flyer.pdf"
rm "$temp_pdf"
done
}
alias make_flyer_help='echo -e "Ex usage: make_flyer \"path/to/inputpdf.pdf\" - Creates a landscape-side-by-side flyer version called \"inputpdf--flyer.pdf\"\n *in your pwd* from a 1 or 2 pg input pdf called \"path/to/inputpdf.pdf\". Accepts multiple arguments. Ex:\n make_flyer \"path/to/inputpdf1.pdf\" \"path/to/inputpdf2.pdf\""'
ব্যবহারের উদাহরণ:
make_flyer "path/to/inputpdf1.pdf" "path/to/inputpdf2.pdf"
সহায়তা তথ্য দেখুন:
make_flyer_help
আউটপুট:
$ make_flyer_help
Ex usage: make_flyer "path/to/inputpdf.pdf" - Creates a landscape-side-by-side flyer version called "inputpdf--flyer.pdf"
*in your pwd* from a 1 or 2 pg input pdf called "path/to/inputpdf.pdf". Accepts multiple arguments. Ex:
make_flyer "path/to/inputpdf1.pdf" "path/to/inputpdf2.pdf"
তথ্যসূত্র:
- https://superuser.com/a/948095/425838
- https://stackoverflow.com/a/11280219/4561887
সম্পর্কিত:
- https://askubuntu.com/questions/214538/printing-in-booklet-format/1095789#1095789
তথ্যসূত্র:
- বাশ ফাংশনে আর্গুমেন্ট কীভাবে পাস করবেন: https://bash.cyberciti.biz/guide/Pass_arguments_into_a_function
- কনসটেনেট স্ট্রিং বাশ: https://linuxize.com/post/bash-concateate-strings/
- বাশ স্ট্রিম হিসাবে সঞ্চিত একটি সেন্টিমিডি চালায়! https://stackoverflow.com/questions/2005192/how-to-execute-a-bash-command-stored-as-a-string-with-quotes-and-asterisk
- সমস্ত ইনপুটগুলিতে একটি সেন্টিমিটারে পুনরাবৃত্তি করুন: https://stackoverflow.com/questions/255898/how-to-iterate-over-arguments-in-a-bash-script/255913#255913
- ফাংশনটিতে পাসিং পরামিতিগুলিতে বাশ করুন: https://stackoverflow.com/questions/6212219/passing-paraters-to-a-bash-function/6212408#6212408
- কীভাবে 1-পিজি পিডিএফকে ফ্লায়ারে রূপান্তর করতে হবে [আমার নিজের আনসস!]: কীভাবে 1 পৃষ্ঠার পিডিএফ পিছু পিডিএফ 2 পৃষ্ঠায় রূপান্তর করবেন?