Showing posts with label Fedora. Show all posts
Showing posts with label Fedora. Show all posts

Saturday, May 12, 2012

Tip: Merge PDF files into a single PDF using Pdftk

In a previous post I've explained how to extract pages from a PDF document.

Funny enough a few days latter I needed to merge some PDF files into a single document, instead of hunting the web for a Windows application to do that (I have to use Windows at work) I used scp to send the files to the home server, ran pdftk there and scp the merged PDF back ;)

So today I'll use Pdftk this time to merge several PDF documents into a single PDF.

Start by installing Pdftk if you haven't using your distributions package manager:
  • Instructions for installing Pdftk for FreeBSD can be found here. 
  • If you are using a Debian based distribution issue apt-get install pdftk.
  • Users of RPM distribution's such as RHEL, CentOS, Scientific Linux and Fedora can install it by running yum install pdftk.
  • To install the program on Gentoo use emerge pdftk.
Now onto using Pdftk for our purpose!

The steps to merge PDF documents into a single PDF consist of:

  1. $ cd change_to_directory_with_target_pdfs
  2. $ pdftk first.pdf second.pdf third.pdf cat output merged-pdf.pdf

The PDF should be listed in the order in which they are to be placed in the final document. More information on Pdftk can be found using man pdftk.

Thursday, January 15, 2009

Tip: Disable beep in Fedora

The first thing I realized I just had to change on Fedora 10 was the bloody beep. Fedora ships with a kernel module for the PC speaker named pcspkr.ko that if left loaded will drive you mad.

With this module loaded you get to hear a lovely beep while using a terminal. To turn off the beep, simply remove the kernel module and blacklist it to have it gone for good.

Here's how:
  1. $ su
  2. # rmmod -v pcspkr
  3. # echo "blacklist pcspkr" >> /etc/modprobe.d/blacklist
On step 1 become superuser, on step 2 we've removed the module for the running session and on step 3 we've prevented it from loading at boot.

These steps can be performed similarly in other distros.