Results 1 to 10 of 12

Thread: Merge files into a single pdf

Hybrid View

  1. #1
    Join Date
    Dec 2007
    Location
    Hyderabad, India
    Beans
    35
    Distro
    Ubuntu 12.04 Precise Pangolin

    Question Merge files into a single pdf

    1. I have several image files accumulated as a result of taking screenshots. I want to merge all of them into a single pdf file. How can I do that?
    2. I save webpages in .mht format using UnMHT addon in firefox. Is there any way to merge several mht files into a single pdf?

  2. #2
    Join Date
    May 2008
    Beans
    40

    Re: Merge files into a single pdf

    One way to put several images into one PDF would be to put them in an Open Office document and export the PDF.
    I know that's probably not what you are looking for but it is an option.
    There are several PDF programs in the Ubuntu Software Center have you not had any luck with them?
    As for printing the .mht files:
    Install cups-pdf from Synaptic and you should be able to print them out as PDF's and combine them into 1 PDF in another PDF program. You could probably do this with the screenshots too.

  3. #3
    Join Date
    Dec 2007
    Location
    Hyderabad, India
    Beans
    35
    Distro
    Ubuntu 12.04 Precise Pangolin

    Talking Re: Merge files into a single pdf

    The option provided by you regarding printing mht files is quite ok but however if there is some option to print all mht files together which is accumulated as a result of few months of work it would be nice. Such a thing would be possible with Adobe Acrobat but I am looking for a solution in ubuntu exclusively.

  4. #4
    Join Date
    Nov 2006
    Beans
    89

    Re: Merge files into a single pdf

    You can do this with convert (ImageMagick) and pdftk (both of which have convenient ubuntu packages).

    # To convert an image to a pdf file suitable for building a pdf

    convert image.png image.pdf

    # To split a PDF file into individual pages (each as a PDF file)
    pdftk original.pdf burst output burst_%04d.pdf

    # To merge pages representing PDF files back together

    pdftk burst_0001.pdf burst_0002.pdf burst_0003.pdf output final.pdf

    Note: they don't have to be individual pages, and you can also stamp an overlay image on top of a PDF if you want to (I looked this stuff up so I could stamp semi-transparent highlighter mark images onto a PDF).

    ps. Sorry, didn't notice you were staring with mht files. convert can't handle them, but there seem to be plenty of ways to convert them to images:

    http://html-to-image.acasystems.com/...t-to-image.htm
    Last edited by kikazaru; September 19th, 2010 at 03:34 AM.

  5. #5
    Join Date
    Oct 2010
    Beans
    2
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Merge files into a single pdf

    I have the same problem. I need to merge pdf files. I generally use the code

    Code:
    gs -q -sPAPERSIZE=letter -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=out.pdf in1.pdf in2.pdf in3.pdf ...
    However, I have a lot of files, named as 0001_something.pdf, 0002_somethingelse.pdf,...,0900_somethingdifferent .pdf.

    Any thoughts?

    ps: Thanks for the pdftk tip. I found some examples in the pdftk page where I could some my problem.

    Cheers!
    Last edited by LeoBastos; October 4th, 2010 at 04:45 PM. Reason: I found a solution to my specific problem.

  6. #6
    Join Date
    Feb 2008
    Beans
    1

    Re: Merge files into a single pdf


  7. #7
    Join Date
    Apr 2005
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Merge files into a single pdf

    For the first part of your question you may be interested in PDF Split and Merge.

    http://www.pdfsam.org/

    Edit: disregard - I misread your source files as pdf not images.
    Last edited by mbeach; March 9th, 2013 at 03:21 AM. Reason: wrong solution

  8. #8
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    10,050
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Merge files into a single pdf

    I love the fact that there are a dozen ways to do the same thing in linux. And because this thread is 2 years old, it will be closed soon.

    But not by me.
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

Tags for this Thread

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
  •