Solved

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

Posted on 2015-02-02
7
222 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 30

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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 30

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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
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

617 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