Long time lurker. 

I'm looking to register a python script as the default pdf reader for windows. 
I assume I can just register the .py in the section windows section for 
registering default handlers, but I'm wondering how to access the file from 
within the program. 

The issue is this:

We have Java application that outputs user uploaded pdf files. It does this 
simply by instructing windows to open the downloaded pdf file and windows takes 
it from there. The data entry person will view the pdf and usually upload it 
into another part of the system. Problem is the second leg of the system 
modifies the pdf, and thus crashes when the pdf is protected against writing. 
Data entry make use of a program to unlock them as needed but it is an extra 
step and it only comes to their awareness after their client crashes on the 
locked pdf (because it doesn't make sense to check them proactively.

I cannot change the Java system. 

What I want to do is write a pdf handler to handle windows open instruction. In 
the script I would run a command line pdf unlocker on the file and open the 
unlocked file with adobe (or the like). 

I've googled and though I get tons of 'how to open pdf from a python script' I 
haven't found anything describing how to write and set up my python program to 
deal with the pdf hand-off from the OS.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to