Long story short, when you use a Web browser control and VBA
to open a pdf file embbeded in a form, the pdf reader fires the print event automatically.
Current setup Win1064Bit/Office365 version 16.0.13628.20234 / Foxit Reader
Here is a screenshot to illustrate what happens
The event is so annoying that it's fired not once, but twice.
Code used to open the PDF file
Private Sub Command2_Click()
Me.WebBrowser0.Navigate2 "C:\Temp\Sample.pdf"
End Sub
Maybe it's too late but I would like to share with you my experience trying a PDF-embedded viewer in access but not limited only to viewing or printing PDFs, I even managed to fill out PDF forms and persist them in a local path or server (could be the CLOUD or a local server, it is up to you)
The Idea
Thanks to the help of Erik A who showed me the way. My solution was using a Web Browser Control that would allow me to display a Web page. This allows you to view a PDF, and even fill out a PDF form but is limited only to downloading the modified PDF (using the PDF viewer installed on the PC Adobe Reader or Foxit Reader)
But in my case, I needed to be able to save the modified PDFs without downloading them, it is also possible to print.
The Solution
Now with Microsoft's new release of the Edge Browser Control you can emulate a Browser using the latest Microsoft Edge(Full features and compatibility with new Web standards, by the way, the old IE Browser Control does not work)
Note!!! WebView2 (Edge Browser Control) is not installed by default or compatible with all Windows and Office versions, please read this post and check your configuration first.
Now to persist the modified PDFs in the backend(local server or Cloud) I created a Simple PDFs File Server with Node, Empress and using Adobe PDF Embed API.
The final result
This view allows you to save the modified PDF to the Simple PDFs file server listening in HTTP://localhost:3000 using the save button.
File saved from the Simple PDFs File Server using the "Save" button.
In this view, you can print and download the modified PDF.
MS Access code
Conclusions
Thanks to the new Microsoft Edge Browser Control and Adobe PDF Embed API you can embed in MS Access PDFs without limitation and fully compatible. You can visit the Adobe PDF Embed API doc for more details about this API customization and features.