Turn photos into pdfs (and shrink them)

For the Indian "e-visa" application, the consulate wanted photos to be: uploaded as a pdf the pdf needed to be smaller than 300KB in size More recently, they have started accepting jpg/png as well but since I had to do all this research to figure this stuff out, I might as well document it all here in case I ever need it in the future again. Note: To get the photos (usually jpg/png) from the phone…