Merging PDF documents in linux



Recently I had a dillemma of sorts. I had a document that had printed to pdf…. each page to it’s own pdf. I didnt’ have time to spend figuring out how to make the document print to one multi-page pdf and so it seemed like it should be pretty easy to attach multiple pdfs into one big multi-page file. Fortunately it is fairly easy (at the linux command line). There are windows tools to do the same, but today this is a linux tip….


Essentially – ghostscript is probably the way you’re going to want to go. For one reason, most every linux system should have it either installed or available. Here’s the basic approach…. (recommended form a newsforge article.)

gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=fulldocument.pdf page1.pdf page2.pdf

Now in my case, it was page1.pdf page2.pdf (you can add multiple files with multiple pages… maybe chapter1.pdf chapter2.pdf chapter3.pdf….)

gs is the main ghostscript executable, -dBATCH tells it to quit once we’ve processed the files, -dNOPAUSE keeps it from waiting for user interaction, -q makes it run without much in the way of messages on the screen (quiet), -sDEVICE=pdfwrite tells ghostscript to use it’s own pdfwriter and of course, -sOutputFile=fulldocument.pdf is the file you want to “lump” everything into…

Thanks to this article for a point in the write direction….

There are other ways to go about it. Many tools are out to make it an easier task to combine pdf’s into one big file, but that got me from point a to b.

Related Posts

Blog Traffic Exchange Related Posts
  • Zarafa Exchange Server replacement and Postfix Integration for multiple domains with unique users So, I've spent some time recently working with Zarafa. It's an exchange replacement that has a completely open source version as well as a version with licenses for outlook if you want that level of integration. It's web interface looks good and is an improvement on Exchange server's capabilities with......
  • Caching downloaded deb files with apt-cacher It seems silly with multiple machines to download the same file multiple times. At some level it's not THAT inconvenient. It really depends on your connection speed and the size of the files in question. For Ubuntu and other systems based on the .deb package format and apt-get there is......
  • Tech support tutorials made easy on linux.... One of the real frustrations with phone tech support is translating step by step what is needed to the person on the other end. I know it sounds easy, but in reality - what if they've got xyz theme for their menuing and it's not there, what if... oh you......
Blog Traffic Exchange Related Websites
  • The Importance Of Anchor Text Keywords While any webmaster knows that doing some link exchanges will bring more visitors on their site, few people know how to use the full potential of a link exchange campaign to boost their website popularity. One of the key elements that determines web page rankings is the number of high......
  • Podcasting Made Easy A podcast is probably the easiest way of getting your voice or music over the internet, and this article will tell how to make a podcast. You will need a domain and a host for you site if you don't already have one. You can get a domain from places......
  • SEO Principles for WordPress Blogs WordPress is a relatively SEO friendly blogging tool to begin with. It offers a linking structure that makes it relatively easy for spiders to crawl your pages, and the code contains very little validation errors if any at all. However, there are a few additional steps that you can follow......
www.pdf24.org    Send article as PDF   

Similar Posts


See what happened this day in history from either BBC Wikipedia
Search:
Keywords:
Amazon Logo

Comments are closed.


Switch to our mobile site