7

I am used to using "pdfjoin", a small utility in older Debian-based distributions (8 and older). When I moved to Ubuntu 18.04, I realized that command is no longer available. Where did it go?

5

You can get pdfjoin by installing texlive-extra-utils.

sudo apt install texlive-extra-utils

Note that when you install texlive-extra-utils, you ought to download a total of 200+ MB of package, which is may not what you want.

If you only plan to process pdf file, it is more convenient to install the right package— for that I recommend pdftk as it's one of the most popular tools and easy to use, proven to work well in my 18.04 system (which is what I use now !)

To install you can use script created by fellow member @Abu Bua.

wget -P /tmp https://gist.githubusercontent.com/markziemann/c48f74eee3f381308e1482852242a493/raw/4f5767d92e9d8fbd89981e47aa940ea7f2526324/pdftk_installer.sh
chmod 755 /tmp/pdftk_installer.sh
/tmp/pdftk_installer.sh

Taken from https://askubuntu.com/a/1046476/253251

| improve this answer | |
2

Add the this function to the ~/.bashrc file or keep as a shell script file.

function combine_pdfs()
{
    output_file=$1
    files=($2)
    gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -dAutoRotatePages=/None -sOutputFile=$output_file "${files[@]}"
}

Remember to source the ~/.bashrc file. Then in a terminal in the folder containing the files type:

combine_pdfs blah_blah.pdf 'first.pdf second.pdf third.pdf fourth.pdf'

The above script will create a file blah.pdf which is a combination of first.pdf, second.pdf and third.pdf.

| improve this answer | |
2

A very small but efficient PDF joiner can be found here. I've written it last year for Ubuntu and Arch Linux. It joins PDF Files and images and intends to replace the "old" debian app. You can find a script (install.sh) that will install it in a second....

| improve this answer | |
1

I have never used that specific tool, but according to this source, it was just a wrapper of pdfjam, so I'd use that utility instead. However, for more complex tasks pdftk is the toolkit to use.

Edit:

After reading the previous answer, I'd like to point out that installing texlive-extra-utils may conflict with a vanilla installation of texlive if you have done so.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.