I study. Often there is a need to glue jpg in a row in pdf and send the report to the teacher. Now I use the imagemagick package - convert *.jpg report.pdf and in most cases I am more than happy with it, but either I’m not very good at reading --help , or there’s still no way I can perform this procedure more flexibly. The first thing that cannot be defeated in any way: 1. There are 2 (two) .jpg (2268 × 4032, vertical photos ) if you directly put them in the pdf in the above-mentioned command, they should be placed horizontally on the page, on the photo per page (so it should be, in the help on the command it is indicated that v convert specially arranges pictures so as to fill the page as much as possible). The main question is how to make him shove photos right as it is (vertically) and fill the rest of the place with white? Add. The question is - maybe you come across / encountered regularly similar tasks and tell the tool more conveniently? PS The last, the most undesirable option is to tweak the most all-powerful crutch on C, C ++, Java, Kotlin, Python (everything I know), the task is spit, but too lazy to interfere, however, if you tell me some interesting options or libraries (byte-by-byte writing to a file starting from the header, well, it will completely kill laziness) - I will be very grateful.

  • If I understand correctly, for these purposes it is better to use tex - Rikitikitavi
  • one
    Each jpeg separately in pdf, and then with the help of pdf2pdf or a dozen different utilities you glue together into a multi-page pdf. PS I'm more than sure that there are elegant ways. And, pdf is not able jpeg, the converter pinches in a suitable format of a compression. - 0andriy

1 answer 1

I apologize, I do not read the manuals well .. Running the command with the -auto-orient key completely solves the task.


Also, special cases of the above problem solve the keys:

  • transform
  • transpose
  • transverse
  • trim