If you need to convert pdf to jpg I was working with php but it might be slow, obviously. But if you are using linux shell then it’s easier and faster.
72 dpi (web) = 595 X 842 pixels
300 dpi (print) = 2480 X 3508 pixels
600 dpi (print) = 4960 X 7016 pixels