Re: How do I capture a mouse click on a link and show a PDF File
Posted: Tue Aug 13, 2019 5:50 pm
Hi,
Read this for more information about that event :
https://magpcss.org/ceforum/apidocs3/pr ... llback%3E)
Consider registering your application as a PDF viewer in Windows and let Windows open your application when the user clicks on a PDF file.
TChromium.OnBeforeDownload will be triggered before the download starts. You can let CEF download the file or cancel it in the TChromium.OnDownloadUpdated event and start your own download using third party components or a URLRequest.stwizard wrote: Tue Aug 13, 2019 3:08 pm 1) I need to know where the best event would be to detect the mouse click on the link so I can download the document.
Read this for more information about that event :
https://magpcss.org/ceforum/apidocs3/pr ... llback%3E)
You can use the "downloadItem" parameter in TChromium.OnBeforeDownload and read the "downloadItem.MimeType" property.stwizard wrote: Tue Aug 13, 2019 3:08 pm 2) I need to be sure that the link is a PDF content and if so show it in the viewer
Consider registering your application as a PDF viewer in Windows and let Windows open your application when the user clicks on a PDF file.