Solved

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

Posted on 2015-02-02
7
212 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 27

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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 27

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

This document is written for Red Hat Enterprise Linux AS release 4 and ORACLE 10g.  Earlier releases can be installed using this document as well however there are some additional steps for packages to be installed see Metalink. Disclaimer: I hav…
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
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.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

762 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

24 Experts available now in Live!

Get 1:1 Help Now