Solved

How to create a script in Ubuntu 14.04 to join several pdf files into one file?

Posted on 2015-02-02
7
217 Views
Last Modified: 2015-02-17
I would like a script that will join several pdf files into one file, using Ubuntu 14.04.  I would need the ability to double click on a file and it would activate the script that would join 4 files on the desktop into one file.  ie 1.pdf, 2.pdf, 3.pdf and 4.pdf into one file called PRS.pdf.
0
Comment
Question by:100questions
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 62

Expert Comment

by:gheist
ID: 40585009
Ghostscript can do that...
0
 
LVL 29

Expert Comment

by:serialband
ID: 40587497
Install ghostscript in ubuntu
sudo apt-get install ghostscript

Here's an example line on how to combine the files
gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=PRS.pdf -dBATCH 1.pdf 2.pdf 3.pdf 4.pdf

Open in new window

0
 

Author Comment

by:100questions
ID: 40594141
Would I double click a file and this script will run?
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
LVL 29

Accepted Solution

by:
serialband earned 500 total points
ID: 40594190
No, it's a command line tool.  You won't be able to do that without some wrappers.  There are viewers that make use of ghostscript, like evince and gsview, but they only let you view PDFs.

You could try PDF Shuffler if you want a GUI tool. http://sourceforge.net/projects/pdfshuffler/
0
 
LVL 62

Expert Comment

by:gheist
ID: 40594282
You can make shortcut to trippleclick.... No idea though how you pass file name arguments that way...
0
 
LVL 1

Expert Comment

by:ranger1021994
ID: 40611050
sudo apt-get install imagemagick

Your script can contain this command
#!/bin/sh
convert *.pdf output.pdf
0
 

Author Closing Comment

by:100questions
ID: 40615667
Have not tried this, hopefully it works.
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question