My similar AppleScript script for export to .doc functions properly.
tell application "Pages"
set docName to name of front document
-- Remove .pages extension.
set prevTIDs to AppleScript's text item delimiters
set AppleScript's text item delimiters to ".pages"
-- Add .pdf extension.
set docName to first text item of docName & ".pdf"
set AppleScript's text item delimiters to prevTIDs
-- Save file to Desktop.
set docPathAndName to (path to desktop as string) & docName
save front document as "SLDocumentTypePDF" in docPathAndName
set userInput to display dialog "Do you want to close this document?" buttons {"No", "Yes"} default button 1
if the button returned of userInput is "Yes" then
close front document
else
tell application "Pages"
activate
end tell
end if
end tell