Yes, it is entirely possible, and several file types did compromise the app as did other methods. Examples:
CVE-2019-11931 — made it possible for attackers to send a specially crafted MP4 file to remotely execute malicious code on the victim’s device without any intervention (A stack-based buffer overflow could be triggered. The issue was present in parsing the elementary stream metadata of an MP4 file and could result in a DoS [denial of service] or RCE [remote code execution] ).
CVE-2019-11932 - Whatsapp GIF RCE exploit - Remote Code Execution via .gif file (double-free memory vulnerability in a WhatsApp image preview library called libpl_droidsonroids_gif.so).
CVE-2019-3568 - A buffer overflow vulnerability in WhatsApp VOIP stack allowed remote code execution via specially crafted series of RTCP packets sent to a target
In the case of .PDFs, there is always the possibility that specially crafted files may do something, even in simple scenarios like previewing them. More than that, if an app that appears to be legitimate but is in fact malicious, watches for PDF invoice files received via WhatsApp, then can swap the displayed bank account information in the invoice with that of a bad actor. The customer receives the invoice, which they were expecting to begin with, but has no knowledge that it’s been altered. By the time the trick is exposed, the money may be long gone. To make matters worse, the invoice hack could be broadly distributed in a non-targeted way, looking for any invoices to manipulate, affecting multiple victims the app.
As someone said in the comments, WhatsApp is not a file sharing app and such usage should be avoided if possible.