Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2015-02-02
7
Medium Priority
?
229 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
Stack Overflow Podcast - Developer Story

Welcome to the Stack Overflow podcast recorded Thursday July 20 at Stack Overflow Headquearters in NYC. Your hosts today are podcast regulars Jay Hanlon, David Fullerton, and Ilana Yitzhaki, plus the quite irregular Matt Sherman (Stack Overflow Engineering Manager extraordinaire)

 
LVL 30

Accepted Solution

by:
serialband earned 2000 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

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…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

715 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