It's localization free.
tell application "System Events"
set appname to name of first process whose frontmost is true
end tell
activate application appname
tell application "System Events"
tell process appname
set nbw to count of windows
keystroke "p" using command down
(*
Wait for the availability of the sheet *)
repeat
if exists sheet 1 of window 1 then exit repeat
end repeat
--name of menu buttons of sheet 1 of window 1
--> {"PDF"} but I don't know if it's spelled this way worldwide
set PDFButton to first menu button of sheet 1 of window 1
click PDFButton
name of menu items of menu 1 of PDFButton
--> {"Ouvrir le PDF dans Aperçu", "Enregistrer au format PDF…", "Enregistrer au format PostScript…", "Faxer le document PDF…", missing value, "@ PDF-BAT.qfilter", "@ PDF-prépresse CMJN.qfilter", "@ PDF-web.qfilter", "@ PDFX3-ISO.qfilter", "Add PDF to iTunes", "Envoyer le document PDF par courrier électronique", "Enregistrer le document PDF dans le dossier de reçus web", missing value, "Modifier le menu…"}
--click menu item "Save As PDF…" of menu 1 of PDFButton
click menu item 2 of menu 1 of PDFButton
(*
Wait for the availability of the Print window *)
repeat
if (count of windows) > nbw then exit repeat
end repeat
-- position of text fields of window 1
--> {position:{875, 190}}
(*
Set the name of the new PDF *)
set value of text field 1 of window 1 to "beurk.pdf"
-- name of buttons of window 1
--> {missing value, missing value, missing value, "Enregistrer", "Nouveau dossier", "Annuler"}
click button -3 of window 1
end tell
end tell
I left the instructions which I use during the building of the script.