I have three PDFs and up to 10 JPGs that I need to merge into one PDF. I found PDFSam, but it looks like it doesn't accept JPGs. I'd also like to create a single batch file to do this for me (if that's possible). Since I have CutePDF installed, I can print to PDF, so I thought I might be able to first print all the JPGs to a PDF and then use PDFSam to merge it with the other PDFs. I'm stuck on printing the JPGs through a cmd though. I found this command in the registry

> "%SystemRoot%\System32\rundll32.exe" "%SystemRoot%\System32\shimgvw.dll",ImageView_PrintTo /pt "%1" "%2" "%3" "%4"

Under this key


I'm not sure what the parameters mean though. Should I even be using that command? If so, how can I pass the PDF printer and all of my JPGs to it? Are there any other/better solutions I might be able to use?


You can use mogrify to convert pdf to jpg and then combine these with the rest of jpgs:

Take a look at this post:

  • If not absolutely necessary you may want to avoid the step that involves re-compressing the PDF content. – Joey Nov 17 '10 at 16:08
  • Nice, glad it solves your problem! – icyrock.com Nov 17 '10 at 21:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.