The shortcode works by leveraging Google’s document viewer. The viewer is basically set up using a url like the following:
If you want to embed the document in a web page, you append &embedded=true to the url and place that url as the src attribute of an iframe.
The problem is that Google’s document viewer doesn’t load PDFs on Google Drive. Our thought is that the PDF link for the file on Google Drive isn’t an actual PDF link. It is more of a link to the PDF viewer on Google Drive.
In doing some research, we found that Google’s PDF viewer has a link you can use to embed the document. By understanding how this works, we were able to adapt the shortcode to not use the document viewer if the file is on Google Drive. In this case, it will use the Google Drive viewer instead.
This change was included in version 2.7.0 which was released in February. If you are using this version or newer and are still having issues, there may be something similar going on.