With the Linux command line / Terminal, it is easy to merge, split and edit PDF files. There is a useful tool for that called pdftk which is like the Swiss knife for PDF-related functions.
To install pdftk, open the Linux Terminal and type in
It also has a snap available. This example uses the snap version on Ubuntu.
Merging PDF files:
To merge different PDF files into one using pdftk, the syntax is:
In this example, different files from 1 to 6, etc are merged into a single output file named doc.pdf. This file has all the pages from the individual source files. So, the command is:
Another example of merging files:
Besides merging, you can also selectively choose pages to omit or include.
Suppose you want to exclude the 4th page of the source PDF file named doc.pdf, then it can be done as follows:
This output file will have all the pages except the one excluded. Pretty cool.
Encrypting and password-protecting PDFs:
pdftk also can encrypt the source PDFs and set a password to open them. To do that, specify the encryption strength.
So, to add 128-bit encryption to a source PDF named doc.pdf, and set a password hello! to open it, the command will be:
The encryption strength has to be specified after the . and the user_pw parameter for adding a password to open the file.
Splitting a PDF file into pages:
To split a PDF file named doc.pdf into individual pages, use the burst parameter:
This burst function will show the individual pages as different files.
Besides these basic operations, pdftk can also rotate pages, repair PDFs, and do a lot more.
To list its various functions, type in
Also, just using pdftk without any parameters or input files will list its commonly used functions.
This tiny utility makes it easy to manage and edit PDF files all through a few simple commands.
All done.
It’s actually a nice and helpful piece of info.
I’m happy that you just shared this helpful information with us.
Please keep us up to date like this. Thanks for sharing.
Way cool! Some extremely valid points! I appreciate you penning this post
and also the rest of the site is also really good.
Please let me know if you’re looking for a article writer
for your site. You have some really great posts and I believe
I would be a good asset. If you ever want to take some of the load
off, I’d really like to write some articles for your blog in exchange for a link
back to mine. Please blast me an email if interested.
Thanks!
Everything is very open with a clear description of the challenges.
It was truly informative. Your site is extremely helpful.
Thank you for sharing!
Hey I know this is off topic but I was wondering if you knew of any
widgets I could add to my blog that automatically tweet my newest twitter updates.
I’ve been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this.
Please let me know if you run into anything. I truly enjoy reading
your blog and I look forward to your new updates.
thank you for authoring this vital and important information to help us news