How to print more efficiently


To save papers and be environment-friendly, whenever possible: - we should print in black and white mode instead of color mode, as the latter is much expensive. - we should print on both sides.

Sometimes, we have many pdfs or images which has only one page or odd-number pages. To save paper, we can convert images to pdfs, them merge all pdfs to one image, then print it on both sides.

Convert multiple images to one PDF then print on both sides

Merge PDF Files then print on both sides

  • Install command line tool: pdftk
    • sudo apt-get install pdftk
  • Merge PDF Files
    • pdftk file1.pdf file2.pdf fiel3.pdf cat output outputfile.pdf

Copy all files into one folder

Before the above steps, we may want to copy all files into one folder, so we can easily convert all or related images together to pdf, and merge all pdfs into one pdf.

we also want to preserve directory names in new filename.

here is the script from superuser

Where:

- %P tell find to omit the leading ./;
- \0 tell find to print the paths using the ASCII NUL character as separator (this should avoid problems with strange names);
- -d $'\0' tell bash to use the proper delimiter for reading the paths;
- ${i////_} tell bash to replace every occurrences of / with _ in the path.

Labels

adsense (5) Algorithm (69) Algorithm Series (35) Android (7) ANT (6) bat (8) Big Data (7) Blogger (14) Bugs (6) Cache (5) Chrome (19) Code Example (29) Code Quality (7) Coding Skills (5) Database (7) Debug (16) Design (5) Dev Tips (63) Eclipse (32) Git (5) Google (33) Guava (7) How to (9) Http Client (8) IDE (7) Interview (88) J2EE (13) J2SE (49) Java (186) JavaScript (27) JSON (7) Learning code (9) Lesson Learned (6) Linux (26) Lucene-Solr (112) Mac (10) Maven (8) Network (9) Nutch2 (18) Performance (9) PowerShell (11) Problem Solving (11) Programmer Skills (6) regex (5) Scala (6) Security (9) Soft Skills (38) Spring (22) System Design (11) Testing (7) Text Mining (14) Tips (17) Tools (24) Troubleshooting (29) UIMA (9) Web Development (19) Windows (21) xml (5)