Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

Print PDF events

Post Reply
michal@dorfin.waw.pl
Posts: 41
Joined: Sun Feb 05, 2017 8:53 am

Print PDF events

Post by michal@dorfin.waw.pl »

When user prints PDF from within the Javascript browser opens default printing window. Is there any way to get the info that this form has been opened and closed ? Do we have any event that we could process ?
The onJsDialog and onFileDialog doesn't work in this case.
User avatar
salvadordf
Posts: 4056
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Print PDF events

Post by salvadordf »

Hi,

CEF exposes several events related to the printing process but the event that you need only works in Linux.

There are two options :
  • Use JavaScript events : https://stackoverflow.com/questions/18325025/how-to-detect-window-print-finish
  • Use the DDetours component to hook the Windows API function that opens the print dialog. https://github.com/MahdiSafsafi/DDetours
Post Reply