Use g_filename_to_uri. Now open-pdf works on Windows too.