Solved

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

Posted on 2015-02-02
7
213 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
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 61

Expert Comment

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

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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 28

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 61

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
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.

919 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now