def ps2pdf(Dir_input_path, Fil_input_path): args = ["ps2pdf", # actual value doesn't matter "-sDEVICE=pdfwrite", #Type de conversion ici en txt "-sOutputFile=" + Dir_input_path + Fil_input_path + ".pdf", Dir_input_path + Fil_input_path] with ghostscript.Ghostscript(*args) as g: ghostscript.cleanup()
C:\Progra~1\gs\gs9.55.0\bin\gswin64c.exe -dPDFA -dbase -dBATCH -dNOPAUSE -dNoSafer -dQUIET -sDEVICE=pdfwrite -dFirstPage=3 -sOutputFile="c:\Prod\Out\LOALE21ZZ.ICDFQ400.V00.pdf" -dEPSCrop -c "<</Orientation 3>> setpagedevice" -f "c:\Prod\LOALE21ZZ.ICDFQ400.V00" -c quit
def ps2txt(Dir_input_path, Fil_input_path): args = ["ps2txt", # actual value doesn't matter "-dBATCH", # "-dNOPAUSE", # "-dNOPROMPT", # "-dSAFER", # "-dFIXEDMEDIA" # "-dFirstPage=3", #Démarrage de la conversion à la page 3 "-sDEVICE=txtwrite", #Type de conversion ici en txt "-sOutputFile=" + Dir_input_path + Fil_input_path + ".txt", Dir_input_path + Fil_input_path] with ghostscript.Ghostscript(*args) as g: ghostscript.cleanup()
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question