Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: [SOLVED] How to merge multiple PDFs into one PDF?

  1. #1
    Join Date
    Oct 2007
    Location
    Earth
    Beans
    Hidden!
    Distro
    Ubuntu

    [SOLVED] How to merge multiple PDFs into one PDF?

    How do you do that?

    I have several PDFs that are 1-pagers and would like to merge them into one large PDF.

    Is there a particular app that does this?

    Thanks!

  2. #2
    Join Date
    Feb 2007
    Location
    The hills of appalachia
    Beans
    966

    Re: How to merge multiple PDFs into one PDF?

    If you think you're free, there's no escape possible. Ram Dass

  3. #3
    Join Date
    Jun 2008
    Location
    California
    Beans
    2,271
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: How to merge multiple PDFs into one PDF?

    You can also use PDFtk, which is in the repo's, to do what you want. The commandline syntac is:

    Code:
    pdftk [input files] cat output [output file]
    In the above command, you need to insert the names of the input files and output file. When combining a large number of PDF files, it may be easiest to place them in an empty directory and use *.pdf as the input files.

    BTW, I use Ghostscript to combine PDF files, as explained in the link provided by y-lee.

  4. #4
    Join Date
    Oct 2007
    Location
    Earth
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: How to merge multiple PDFs into one PDF?

    That did the trick...

    I'll copy/paste the info just in case that website ever removes the info...

    Quote Originally Posted by http://www.newlinuxuser.com/merge-multiple-pdfs-into-one-file/


    This process requires you to install two packages: Ghostscript and PDFtk. These packages are widely available in the repositories of your distro of choice. If you are going to install them using apt, use the following commands:

    apt-get install gs
    apt-get install pdftk


    Now, open a terminal and copy and paste the following command:

    gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=firstANDsecond.pdf -dBATCH first.pdf second.pdf
    Change the name of first.pdf and second.pdf to the PDF files that you would like to merge, and change the name of firstANDsecond.pdf to the name you would like to name your merged pdf file. If you haven’t changed directories, the merged document will be created in your home directory.
    This command allows you to merge more than just two documents. If you would like to merge three or more PDF files, continue to append the file names to the above command (separated by a space).

    On another note... is there a PDF "editor" out there?

    I've used Adobe-type apps before, pretty handy, though am not familiar with any open source variations. Thanks!

  5. #5
    Join Date
    May 2006
    Location
    Wichita, Kansas
    Beans
    2,967
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: How to merge multiple PDFs into one PDF?

    To edit PDF files, there is pdfedit in the repositories. This may be what you are looking for. Here's a link about using it under Feisty, which gives some additional information:

    http://www.howtoforge.com/editing_pd..._ubuntu_feisty

  6. #6
    Join Date
    Oct 2007
    Location
    Earth
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: How to merge multiple PDFs into one PDF?

    lol "pdfedit"... I should've figured that out! thx, good to know... it seems to be doing a pretty good job at basic pdf editing, though basics is all I need.

  7. #7
    Join Date
    Jun 2008
    Location
    California
    Beans
    2,271
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: How to merge multiple PDFs into one PDF?

    For years I never knew how to combine multiple PDFs into one PDF file without the use of Adobe Professional. However, this can be done and can be done in Linux very very easily and of course, for free. This process requires you to install two packages: Ghostscript and PDFtk.
    The above statement is somewhat inaccurate in that PDFtk is not needed to combine multiple PDF files into one PDF file. Ghostscript alone will do the job just fine. This isn't all that important except that PDFtk and needed dependencies can consume about 40 MB of disk space.

  8. #8
    Join Date
    Oct 2007
    Location
    Earth
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: How to merge multiple PDFs into one PDF?

    Quote Originally Posted by kaibob View Post
    The above statement is somewhat inaccurate in that PDFtk is not needed to combine multiple PDF files into one PDF file. Ghostscript alone will do the job just fine. This isn't all that important except that PDFtk and needed dependencies can consume about 40 MB of disk space.
    ORLY?

    How do you merge PDFs with gs?

  9. #9
    Join Date
    Oct 2007
    Location
    Earth
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: How to merge multiple PDFs into one PDF?

    How would I create a PDF that would consist of some screenshots?

    EDIT:
    Okay I have somewhat of a progress on that one...
    I saved a screenshot (.png) as ghostscripts (.ps) in gimp, then used:
    Code:
    gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=firstANDsecond.pdf -dBATCH first.pdf second.pdf


    However, I'm not sure how to save all the "png" as "ps" in one step. Any ideas?
    Last edited by Th3Professor; June 8th, 2008 at 06:32 PM.

  10. #10
    Join Date
    Jun 2008
    Location
    California
    Beans
    2,271
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: How to merge multiple PDFs into one PDF?

    Quote Originally Posted by Th3Professor View Post
    ORLY? How do you merge PDFs with gs?
    I'm sorry but I'm not sure I understand your question. You merge PDF's with gs (Ghostscript) by way of the gs commandline contained in your above posting. The point I was trying to make was that PDFtk is not needed to do this. I'm sure that I misunderstand what you are asking, but I can't quite figure this out.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •