Visit our other dedicated websites
Asha Bhonsle Geeta Dutt Hamara Forums Hamara Photos Kishore Kumar Mohd Rafi Nice Songs Shreya Ghoshal
Hamara Forums

Welcome Guest ( Log In | Register )

Linux And Free Software Tips, Tricks And Tutorials

, fun with Free Software

 
> Linux And Free Software Tips, Tricks And Tutorials, fun with Free Software
hildebrand
post Sep 20 2009, 02:02 AM
Post #1


Dedicated Member
Group Icon

Group: Members
Posts: 6729
Joined: 5-February 08
Member No.: 39973



I am starting this thread with a long term perspective to put together lots of useful information for our programs.
Request all to participate in this thread to spread the word about all the lovely things that can be done on Linux.

The distribution I use is Debian (from www.debian.org) but most tricks shall be generic in nature (program based). Many of the softwares are available on windows also so some tips maybe applicable for their windows versions also.

This post has been edited by hildebrand: Oct 10 2009, 07:19 PM

Best Regards
Hildebrand


Samandar ko Baandhe Aisa Koi Ghaat Nahi, Kadmon ko thaame aisi koi baat nahin Patli si dhaara samundar mein milti hai, milkar ke kho jaati hai, ghaat ghaat hi rehte hain woh samundar ho jaati hai, karlo jo chaaho, banlo jo chaaho

“Geet boodhe nahin hote, unke chehron pe jhurriyan nahi girti
wo palte rahte hain, chalte rahte hain
sun-ne walo ki umra badal jaati hai….”

Please Visit
http://www.anmolfankaar.com: A website dedicated to Artists of the Indian Subcontinent. Now follow it on twitter too. http://twitter.com/anmolfankaar

http://www.shamshadbegum.com : A website dedicated to the Living Legend Shamshad Begum. May She Live Long.

http://www.madamnoorjehan.com : A website dedicated to Madam Noorjehan

http://www.geetadutt.com : A website dedicated to Geeta Dutt Nee Roy
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
 
Reply to this topicStart new topic
Replies
hildebrand
post Feb 17 2010, 12:49 AM
Post #2


Dedicated Member
Group Icon

Group: Members
Posts: 6729
Joined: 5-February 08
Member No.: 39973



Tip #17 - Stapler for pdf

Often one has lots of pdf's and one wishes it was possible to have an "software" stapler with which one could add delete pages at will and do other things with it.

pdftk is what you've been looking for.

To quote from the manual:-

If PDF is electronic paper, then pdftk is an electronic stapler-remover,
hole-punch, binder, secret-decoder-ring, and X-Ray-glasses. Pdftk is a
simple tool for doing everyday things with PDF documents. Keep one in the
top drawer of your desktop and use it to:
- Merge PDF documents
- Split PDF pages into a new document
- Decrypt input as necessary (password required)
- Encrypt output as desired
- Fill PDF Forms with FDF Data and/or Flatten Forms
- Apply a Background Watermark
- Report PDF on metrics, including metadata and bookmarks
- Update PDF Metadata
- Attach Files to PDF Pages or the PDF Document
- Unpack PDF Attachments
- Burst a PDF document into single pages
- Uncompress and re-compress page streams
- Repair corrupted PDF (where possible)

That gives an idea about what all the software can do.

What more can one ask of a software which is just a little over 3 MB in installed size!

Here are some examples on how to use the lovely software:-

Decrypt a PDF
pdftk secured.pdf input_pw foopass output unsecured.pdf

Encrypt a PDF using 128-bit strength (the default), withhold all permissions (the default)
pdftk 1.pdf output 1.128.pdf owner_pw foopass

Same as above, except password ’baz’ must also be used to open output PDF
pdftk 1.pdf output 1.128.pdf owner_pw foo user_pw baz

Same as above, except printing is allowed (once the PDF is open)
pdftk 1.pdf output 1.128.pdf owner_pw foo user_pw baz allow printing

Join in1.pdf and in2.pdf into a new PDF, out1.pdf
pdftk in1.pdf in2.pdf cat output out1.pdf
or (using handles):
pdftk A=in1.pdf B=in2.pdf cat A B output out1.pdf
or (using wildcards):
pdftk *.pdf cat output combined.pdf

Remove ’page 13’ from in1.pdf to create out1.pdf
pdftk in.pdf cat 1-12 14-end output out1.pdf
or:
pdftk A=in1.pdf cat A1-12 A14-end output out1.pdf

Apply 40-bit encryption to output, revoking all permissions (the default). Set the owner PW to ’foopass’.
pdftk 1.pdf 2.pdf cat output 3.pdf encrypt_40bit owner_pw foopass

Join two files, one of which requires the password ’foopass’. The output is not encrypted.
pdftk A=secured.pdf 2.pdf input_pw A=foopass cat output 3.pdf

Uncompress PDF page streams for editing the PDF in a text editor (e.g., vim, emacs)
pdftk doc.pdf output doc.unc.pdf uncompress

Uncompress PDF page streams for editing the PDF in a text editor (e.g., vim, emacs)
pdftk doc.pdf output doc.unc.pdf uncompress

Repair a PDF’s corrupted XREF table and stream lengths, if possible
pdftk broken.pdf output fixed.pdf

Burst a single PDF document into pages and dump its data to doc_data.txt
pdftk in.pdf burst

Burst a single PDF document into encrypted pages. Allow low-quality printing
pdftk in.pdf burst owner_pw foopass allow DegradedPrinting

Write a report on PDF document metadata and bookmarks to report.txt
pdftk in.pdf dump_data output report.txt

Rotate the first PDF page to 90 degrees clockwise
pdftk in.pdf cat 1E 2-end output out.pdf

Rotate an entire PDF document to 180 degrees
pdftk in.pdf cat 1-endS output out.pdf

Best Regards
Hildebrand


Samandar ko Baandhe Aisa Koi Ghaat Nahi, Kadmon ko thaame aisi koi baat nahin Patli si dhaara samundar mein milti hai, milkar ke kho jaati hai, ghaat ghaat hi rehte hain woh samundar ho jaati hai, karlo jo chaaho, banlo jo chaaho

“Geet boodhe nahin hote, unke chehron pe jhurriyan nahi girti
wo palte rahte hain, chalte rahte hain
sun-ne walo ki umra badal jaati hai….”

Please Visit
http://www.anmolfankaar.com: A website dedicated to Artists of the Indian Subcontinent. Now follow it on twitter too. http://twitter.com/anmolfankaar

http://www.shamshadbegum.com : A website dedicated to the Living Legend Shamshad Begum. May She Live Long.

http://www.madamnoorjehan.com : A website dedicated to Madam Noorjehan

http://www.geetadutt.com : A website dedicated to Geeta Dutt Nee Roy
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Posts in this topic
hildebrand   Linux And Free Software Tips, Tricks And Tutorials   Sep 20 2009, 02:02 AM
hildebrand   Tip #1: Converting bitrate of mp3 files I sometim...   Sep 20 2009, 02:13 AM
hildebrand   Tip #2 : Zipping files It is possible to zip a fi...   Sep 20 2009, 02:15 AM
hildebrand   Tip #3: Making list of mp3 files in a folder The...   Sep 20 2009, 02:21 AM
Exon   [b] Tip #3: Making list of mp3 files in a folder ...   Sep 20 2009, 03:29 AM
hildebrand   Exon I also use the same version of mp3report. I h...   Sep 20 2009, 03:30 PM
Exon   Exon I also use the same version of mp3report. I ...   Sep 20 2009, 03:59 PM
hildebrand   Tip #4: mp3info As mentioned by Exon, mp3info i...   Sep 20 2009, 03:44 PM
hildebrand   Tip #6 : file This is a very handy default utility...   Sep 21 2009, 01:05 PM
hildebrand   Tip #7: extract utility (which uses libextractor) ...   Sep 21 2009, 02:18 PM
hildebrand   Tip #8 - Software for editing mp3 tags : kid3-qt ...   Sep 21 2009, 02:31 PM
hildebrand   Tip #9: Screen Capture Software Often for presenta...   Sep 23 2009, 10:57 PM
hildebrand   Tip #10: Zipping and unzipping many files in a fol...   Oct 8 2009, 11:56 PM
hildebrand   Please note that windows users can also use the zi...   Oct 10 2009, 07:22 PM
hildebrand   Tip #11: Making multibyte zip of big files Someti...   Oct 12 2009, 10:29 PM
hildebrand   Tip #12: Typing Tutor KLavaro is a lovely typin...   Oct 28 2009, 12:01 AM
hildebrand   Tip #13: How to type in Hindi in Open Office and ...   Nov 5 2009, 06:54 PM
hildebrand   Tip #14: Installing Winamp using wine on Linux Fol...   Nov 12 2009, 10:01 PM
Exon   HB, Will installing Wine in a Linux machine incre...   Nov 12 2009, 10:09 PM
hildebrand   HB, Will installing Wine in a Linux machine incr...   Nov 12 2009, 10:20 PM
hildebrand   Tip #15: Installing Goldwave on Linux using wine ...   Nov 12 2009, 10:19 PM
hildebrand   Tip #16: How to recover files deleted by rm -r ht...   Dec 13 2009, 10:55 AM
hildebrand   Tip #17 - Stapler for pdf Often one has lots of p...   Feb 17 2010, 12:49 AM
hildebrand   A nice list of mistakes done by new users of linux...   May 26 2010, 07:14 PM
hildebrand   Tip #18: Partitioning a pen drive with label name ...   Mar 29 2011, 06:05 PM
hildebrand   Tip #19: Using mp3info to get the information from...   Apr 2 2011, 05:56 PM


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


 

- Lo-Fi Version | Disclaimer | HF Guidelines | Be An Angel Time is now: 30th July 2025 - 06:43 PM