How to replace default file system (ASFileSys) via plug_in for files being opened in Acrobat?
Problem: to open PDF files encrypted as a whole using 3rd party methods, such encrypted files have custom file extension (like foo.pdf.newext).
Solutions tried:
- wrote a new Acrobat plug_in (based on Acrobat SDK's sample DMSIntegration), implemented custom ASFileSys to encrypt/decrypt underlying file on disk. To make Acrobat use my ASFileSys I replaced default file open dialog (AVAppOpenDialog()) with my own by replacing its HFT entry and provided my own ASFileSys instead of ASGetDefaultFileSys() as out param of replaced call. It works for files opened via file open dialog. But it does not work for files opened directly from Explorer or Comman prompt as no file open dialog is involved. Any help here on how to replace ASFileSys files opened from Explorer?
- wrote a new Acrobat plug_in (based on Acrobat SDK's sample DMSIntegration), implemented custom ASFileSys to encrypt/decrypt underlying file on disk. To make Acrobat use my ASFileSys I registred for File open notifications (AVDocWillOpenFromFile and AVDocDidOpen), but I can't replace ASFileSys here and Acrobat will fail to recognize file format using its default file sys (file is encrypted as whole) and will show error message after calling AVDocWillOpenFromFile. I can initiate file open programatically with my own ASFileSys on detecting this error but by then Acrobat's alert message is already shown to user. Need to replace Alert message's HFT entry to not show it in such cases. This is not ideal. Any help here on how to replace ASFileSys via AVDocWillOpenFromFile()?
- Also tried intercepting AVDocOpenFromASFileWithParams() by replacing its HFT entry but looks like it is not called by Acrobat to open files.
- Any other solution?
