- Edition de contenu PDF (Annotations > Editer le contenu) : - Onglet Texte : liste le texte detecte, masquer des lignes - Onglet Images : liste les images, remplacer ou masquer - Actions en ligne de commande (--action booklet_a4|booklet_a3|nup_2x2|unbooklet) - Menu contextuel Windows enrichi : - Ouvrir, Livret A4, Livret A3, 2x2 par feuille, Delivretiser - Bouton Editer dans la barre d'outils droite Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
102 lines
4.0 KiB
Batchfile
102 lines
4.0 KiB
Batchfile
@echo off
|
|
chcp 65001 >nul 2>&1
|
|
echo ============================================================
|
|
echo CopyDev Imposing Tool — Enregistrement Windows
|
|
echo ============================================================
|
|
echo.
|
|
|
|
:: Trouver l'exe
|
|
set "EXE_PATH=%~dp0CopydevImposingTool.exe"
|
|
if not exist "%EXE_PATH%" (
|
|
set "EXE_PATH=%~dp0dist\CopydevImposingTool.exe"
|
|
)
|
|
if not exist "%EXE_PATH%" (
|
|
echo [ERREUR] CopydevImposingTool.exe introuvable.
|
|
pause
|
|
exit /b 1
|
|
)
|
|
echo Executable : %EXE_PATH%
|
|
echo.
|
|
|
|
echo 1. Associer les fichiers PDF
|
|
echo 2. Ajouter au menu contextuel
|
|
echo 3. Tout enregistrer (1+2)
|
|
echo 4. Tout desenregistrer
|
|
echo 5. Quitter
|
|
echo.
|
|
set /p "CHOIX=Votre choix [1-5] : "
|
|
|
|
if "%CHOIX%"=="1" goto ASSOC
|
|
if "%CHOIX%"=="2" goto CONTEXT
|
|
if "%CHOIX%"=="3" goto ALL
|
|
if "%CHOIX%"=="4" goto UNREGISTER
|
|
if "%CHOIX%"=="5" exit /b 0
|
|
|
|
:ALL
|
|
call :DO_ASSOC
|
|
call :DO_CONTEXT
|
|
goto DONE
|
|
|
|
:ASSOC
|
|
call :DO_ASSOC
|
|
goto DONE
|
|
|
|
:CONTEXT
|
|
call :DO_CONTEXT
|
|
goto DONE
|
|
|
|
:DO_ASSOC
|
|
echo.
|
|
echo [1] Association des fichiers PDF...
|
|
reg add "HKCU\Software\Classes\.pdf\OpenWithProgids" /v "CopyDevImpose" /t REG_SZ /d "" /f >nul 2>&1
|
|
reg add "HKCU\Software\Classes\CopyDevImpose" /ve /d "CopyDev Imposing Tool" /f >nul 2>&1
|
|
reg add "HKCU\Software\Classes\CopyDevImpose\shell\open\command" /ve /d "\"%EXE_PATH%\" \"%%1\"" /f >nul 2>&1
|
|
reg add "HKCU\Software\Classes\CopyDevImpose\DefaultIcon" /ve /d "%EXE_PATH%,0" /f >nul 2>&1
|
|
echo [OK] PDF associe a CopyDev Imposing Tool
|
|
echo (clic droit > Ouvrir avec > CopyDev Imposing Tool)
|
|
goto :EOF
|
|
|
|
:DO_CONTEXT
|
|
echo.
|
|
echo [2] Menu contextuel Windows...
|
|
:: Entree principale
|
|
reg add "HKCU\Software\Classes\SystemFileAssociations\.pdf\shell\CopyDevImpose" /ve /d "CopyDev Impose" /f >nul 2>&1
|
|
reg add "HKCU\Software\Classes\SystemFileAssociations\.pdf\shell\CopyDevImpose" /v "SubCommands" /t REG_SZ /d "" /f >nul 2>&1
|
|
reg add "HKCU\Software\Classes\SystemFileAssociations\.pdf\shell\CopyDevImpose" /v "Icon" /t REG_SZ /d "%EXE_PATH%,0" /f >nul 2>&1
|
|
|
|
:: Sous-commandes
|
|
reg add "HKCU\Software\Classes\SystemFileAssociations\.pdf\shell\CopyDevImpose\shell\open" /ve /d "Ouvrir" /f >nul 2>&1
|
|
reg add "HKCU\Software\Classes\SystemFileAssociations\.pdf\shell\CopyDevImpose\shell\open\command" /ve /d "\"%EXE_PATH%\" \"%%1\"" /f >nul 2>&1
|
|
|
|
reg add "HKCU\Software\Classes\SystemFileAssociations\.pdf\shell\CopyDevImpose\shell\bookletA4" /ve /d "Livret A4" /f >nul 2>&1
|
|
reg add "HKCU\Software\Classes\SystemFileAssociations\.pdf\shell\CopyDevImpose\shell\bookletA4\command" /ve /d "\"%EXE_PATH%\" --action booklet_a4 \"%%1\"" /f >nul 2>&1
|
|
|
|
reg add "HKCU\Software\Classes\SystemFileAssociations\.pdf\shell\CopyDevImpose\shell\bookletA3" /ve /d "Livret A3" /f >nul 2>&1
|
|
reg add "HKCU\Software\Classes\SystemFileAssociations\.pdf\shell\CopyDevImpose\shell\bookletA3\command" /ve /d "\"%EXE_PATH%\" --action booklet_a3 \"%%1\"" /f >nul 2>&1
|
|
|
|
reg add "HKCU\Software\Classes\SystemFileAssociations\.pdf\shell\CopyDevImpose\shell\nup2x2" /ve /d "2x2 par feuille" /f >nul 2>&1
|
|
reg add "HKCU\Software\Classes\SystemFileAssociations\.pdf\shell\CopyDevImpose\shell\nup2x2\command" /ve /d "\"%EXE_PATH%\" --action nup_2x2 \"%%1\"" /f >nul 2>&1
|
|
|
|
reg add "HKCU\Software\Classes\SystemFileAssociations\.pdf\shell\CopyDevImpose\shell\unbooklet" /ve /d "Delivretiser" /f >nul 2>&1
|
|
reg add "HKCU\Software\Classes\SystemFileAssociations\.pdf\shell\CopyDevImpose\shell\unbooklet\command" /ve /d "\"%EXE_PATH%\" --action unbooklet \"%%1\"" /f >nul 2>&1
|
|
|
|
echo [OK] Menu contextuel ajoute
|
|
echo (clic droit sur PDF > CopyDev Impose > ...)
|
|
goto :EOF
|
|
|
|
:UNREGISTER
|
|
echo.
|
|
echo Suppression des enregistrements...
|
|
reg delete "HKCU\Software\Classes\CopyDevImpose" /f >nul 2>&1
|
|
reg delete "HKCU\Software\Classes\.pdf\OpenWithProgids" /v "CopyDevImpose" /f >nul 2>&1
|
|
reg delete "HKCU\Software\Classes\SystemFileAssociations\.pdf\shell\CopyDevImpose" /f >nul 2>&1
|
|
echo [OK] Tout desenregistre
|
|
goto DONE
|
|
|
|
:DONE
|
|
echo.
|
|
echo ============================================================
|
|
echo Termine
|
|
echo ============================================================
|
|
pause
|