Question: How can I merge several `.png` files into one PDF file in Unix?

Answer: 
From looking through the documentation on ImageMagick, it might be as easy as:

```
convert 1.png 2.png myfile.pdf

```

See comments about possible risks. If that doesn't work, [PDFjam](http://www2.warwick.ac.uk/fac/sci/statistics/staff/academic-research/firth/software/pdfjam) claims to be able to solve your problem.
I stole this, but this is the solution I used from Jeremiah Willcock and another answer website. Not digging through history at the moment. I lied, I did. (Tully @<https://askubuntu.com/a/626301>)  

I needed a file small enough to email.

To combine images into a PDF
(from in working directory use command line:

```
user@box:/home/user/scans/:$ 
convert 1.png 2.png convertoutput.pdf

```

To shrink using ghostscript after combining 
(I used on kde default system almost):

```
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/default \
   -dNOPAUSE -dQUIET -dBATCH -dDetectDuplicateImages -dCompressFonts=true \
   -r150 -sOutputFile=output.pdf convertoutput.pdf

```

My file had 14 images (19MB after convert, gs made it 1.6MB, quality was still great). The output file is called `output.pdf`.