4

I am currently trying to figure out an issue with an Application Protocol Handler I've created. Following the directions listed on MSDN (http://msdn.microsoft.com/en-us/library/aa767914%28v=vs.85%29.aspx), I was able to register my application, PDF Annotator, to open via a URL. The issue I am experiencing is when I try to pass a parameter along with the call. The application will open, but the file parameter that gets passed is not opening within the application.

My registry key is verbatim as dictated by MSDN. My HTML code is as follows:

PDFAnnotator:C:\path\to\file\file.pdf

The way I understood the protocol handler is it takes the URL and tries to launch it via the command line. That being said, I am able to open my pdf file in PDFAnnotator with following command in the prompt:

PDFAnnotator.exe C:\path\to\file\file.pdf

I've tried formatting the file path in the HTML differently thinking that would be the issue too. Has anyone else come across this issue or something similar?

Obligatory Update for future generations (http://xkcd.com/979/):

The reason I was doing this is because half of the PDFs my application handled would be editable while the other half were read-only. I was trying to keep the read-only ones in browser with the Acrobat plugin (I'm targeting chrome only) while the protocol would allow me to set the links of the editable ones to open with Annotator. I tried, on whim, to reverse this (setting the default to Annotator and creating a protocol for Acrobat). I did this, first by trying Acrobat's URI Scheme (acrobat://), which didn't work outside of opening Acrobat. Then, I tried creating a protocol for Acrobat. When that fired off, it gave me an error stating the path was wrong for the file name, path name, or volume. So, progress? I'm giving up on this for now as other priorities have come up, but hopefully this helps somebody down the road.

LNendza
  • 1,350
  • 1
  • 12
  • 21

0 Answers0