CEP-Resources icon indicating copy to clipboard operation
CEP-Resources copied to clipboard

CSInterface.openURLInDefaultBrowser cannot open a specified page in a PDF file

Open zhangusc opened this issue 3 years ago • 4 comments

I try using CSInterface.openURLInDefaultBrowser to open a local pdf file and go directly to a specified page inside that pdf file. The method works for a PDF file on a web URL, but not for opening a PDF file on the disk (inside the extension folder)

CSInterface.openURLInDefaultBrowser("https://www.esri.com/content/dam/esrisites/en-us/media/brochures/arcgis-enterprise-functionality-matrix.pdf#page=5") Open the PDF in the browser and display page 5

Download the pdf to your CEP extension folder on the disk and open the file CSInterface.openURLInDefaultBrowser("file:///C:/Program%20Files%20(x86)/Common%20Files/Adobe/CEP/extensions/[YourExtensionFolder]/arcgis-enterprise-functionality-matrix.pdf#page=5") Open the PDF in the browser but display page 1. The hashtag in the URL got lost.

zhangusc avatar Mar 09 '21 08:03 zhangusc

@ErinFinnegan Could you pass this to the CEP team and have someone investigate the issue?

zhangusc avatar Mar 09 '21 22:03 zhangusc

Yes, absolutely! The product teams have been swamped lately doing updates for M1/Apple Silicon, but there should be more bandwidth now. (The two monitor bug is slated for this month as well.)

ErinFinnegan avatar Mar 10 '21 00:03 ErinFinnegan

@zhangusc I dont think this was working earlier either.Was it? It seems to be more of an enhancement to me.

sujaisivanandan avatar Mar 23 '21 11:03 sujaisivanandan

Thank you @sujaisivanandan for looking into it. I didn't check the issue on old releases. Enhancement/bug, either way, sounds good to me as long as it gets into your plan.

zhangusc avatar Mar 26 '21 23:03 zhangusc