Opening a PDF File
Posted: Thu Dec 23, 2021 3:57 pm
Delphi 10.4.2
I have a page that displays links to PDF documents. This page is displayed in a new pop out window with a title of "Case Summary", not in the default browser. Because of sensitive data on this new window I can only show this portion of the screen.
PDF File List When I click on a link, the file is automatically downloaded to the Downloads folder which is fine, then the following Downloads dialog is displayed. Here I show the results after clicking all five links: Notice in the image above that there is a new button added to the Title Bar of the "Case Summary" window for the Downloads dialog. If I click "Open file", the PDF file is opened in yet another new window and this new window is opened behind my "Case Summary" window which means I now have to move the "Case Summary" screen to see the PDF document.
If I move the "Case Summary" window (so I could see the PDF file) while the Downloads dialog is displayed, the Downloads dialog disappears as does the button to open that dialog.
If the close button is clicked on this Downloads dialog, the new button added to the "Case Summary" window will also disappear and the only way to access the Downloads dialog again is to click on one of the PDF file links again.
I have a few questions:
1) If "Open file" is clicked in the Downloads dialog, how do I get it to open in front of the "Case Summary" window?
2) When "Open file" is clicked (or the user clicks the close button on the dialog) the Downloads dialog disappears which is fine, but, the button added to the "Case Summary" window also disappeared. Is there any way to always show the "Downloads" button on the "Case Summary" window (Even if there are no files in the download folder yet, if necessary)?
3) Is there anyway to bypass showing the Downloads dialog and simply open the PDF file in a new window?
4) When a file is downloaded to the Download folder, how do I fetch the name of the file that was downloaded?
Any help is truly appreciated.
I have a page that displays links to PDF documents. This page is displayed in a new pop out window with a title of "Case Summary", not in the default browser. Because of sensitive data on this new window I can only show this portion of the screen.
PDF File List When I click on a link, the file is automatically downloaded to the Downloads folder which is fine, then the following Downloads dialog is displayed. Here I show the results after clicking all five links: Notice in the image above that there is a new button added to the Title Bar of the "Case Summary" window for the Downloads dialog. If I click "Open file", the PDF file is opened in yet another new window and this new window is opened behind my "Case Summary" window which means I now have to move the "Case Summary" screen to see the PDF document.
If I move the "Case Summary" window (so I could see the PDF file) while the Downloads dialog is displayed, the Downloads dialog disappears as does the button to open that dialog.
If the close button is clicked on this Downloads dialog, the new button added to the "Case Summary" window will also disappear and the only way to access the Downloads dialog again is to click on one of the PDF file links again.
I have a few questions:
1) If "Open file" is clicked in the Downloads dialog, how do I get it to open in front of the "Case Summary" window?
2) When "Open file" is clicked (or the user clicks the close button on the dialog) the Downloads dialog disappears which is fine, but, the button added to the "Case Summary" window also disappeared. Is there any way to always show the "Downloads" button on the "Case Summary" window (Even if there are no files in the download folder yet, if necessary)?
3) Is there anyway to bypass showing the Downloads dialog and simply open the PDF file in a new window?
4) When a file is downloaded to the Download folder, how do I fetch the name of the file that was downloaded?
Any help is truly appreciated.