When someone visits our permalink, we need it to go directly to the media PDF, rather than showing a page with the preview which is clickable. Is this possible?
It sounds like you're embedding the PDF directly into the page using the media library function.
Instead, you can visit the media library directly, copy the permalink of the file you'd like to link to, and use the copied permalink as the hyperlink around for text or the image.
It's manual, but solves your problem without any bloat or custom fixes.
Without seeing your code I will make some assumptions. I assume that when you were trying this you were using
the_permalink() as your
href value inside the loop something like this:
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
However, as you noted this takes to you the preview of the attachment. Instead you need to
wp_get_attachment_url() to get the URL of the file like below.
<a href="<?php echo wp_get_attachment_url(); ?>"><?php the_title(); ?></a>