I've been trying to use LaTeX to generate some well formatted text blocks, so I can composite them together with images using ImageMagick. (I'm building cards for a card game. Mostly graphics, but a few blocks of text that have to look nicer than ImageMagick will reliably format them.)
Unfortunately, LaTeX is outputting PDFs with an implied DPI of 72 in the metadata. So when I try to composite them in with 300dpi graphics in ImageMagick, they come out tiny. If I tell ImageMagick to upscale them, it still reads them in at 72dpi, then enlarges that, and all the text looks hideously pixelated.
Using mdls, I might have found one clue seems to be in the metadata:
kMDItemPageHeight = 85.039
kMDItemPageWidth = 141.7319946289062
(This is a 50mm x 30mm document. At first I was thinking that the kMDItemPageWidth proved the pdf was being written at 72 dpi. But on looking into it, this metadata is setting the size of the document in points, not pixels. So this may not be the clue I thought it was.)
How do I get LaTeX to set that metadata, or otherwise construct the pdf file, so that when ImageMagick opens it, it's going to honor that the intended resolution is 300dpi instead of the 72dpi that's currently being written into the metadata?
\pdfimageresolution=300
will help (in Preamble). But actually, it should not make a difference for your purpose. You can command ImageMagick to disregard whatever the PDF says, as long as the images and text are vector. You can also import a PDF page into a graphics app, such as GIMP, and tell it whatever resolution you like, when it imports the file.