Showing posts with label pdf. Show all posts
Showing posts with label pdf. Show all posts

Friday, October 4, 2019

How to merge multiple PDFs into a single PDF

Having multiple PDF files you can merge them into a single PDF file using pdfunite command.

Example:

pdfunite 1.pdf 2.pdf 3.pdf result.pdf

The command is included in poppler-utils package and is available in Fedora out of the box. If missed, can be installed as follows:

sudo dnf install poppler-utils

Thursday, May 14, 2015

Convert images to pdf and back

Today I found out a simple and flexible tool which converts images to pdf and vice versa - convert. It was already built in my Fedora 21.

Example:

Let's say I have 1.jpg, 2.jpg, 3.jpg files. To convert them into a single result.pdf run the following command:

$ convert 1.jpg 2.jpg 3.jpg result.pdf

or

$ convert {1..3}.jpg result.pdf

Now I want to get my images back from the result.pdf:

$ convert -density 300 result.pdf image.jpg

where "-density 300" is a precision in points per inch. Each pdf page will be converted into a separate image.

convert supports a lot of different flags and options. To learn more about it:

$ man convert

or