I try to export Pages document as PDF, and for some reason the app says something is wrong:
tell front document of application "Pages"
export to "Macintosh HD:Users:myName:Documents:xyz.pdf" as PDF
end tell
“Pages got an error: The document “test” could not be exported as “xyz”. Your most recent changes might be lost.” number 6
What is the problem there?
(I don’t know whether it is worth to mention, but this or apparently very similar code worked for me today. I tested it multiple times. But then it stopped to work. It seems I made some change that I haven’t even noticed…)