- Joined
- Feb 10, 2021
- Messages
- 2
- Reaction score
- 0
Hi, I noticed that in macOS Big Sur, Apple added the possibility to export PDFs as PDF/A documents, which is great and I appreciate it. Was wishing for this for years!
However, I could not find any documentation for this and especially, I would like to integrate this capability into my AppleScripts, where I convert my Pages documents directly to PDF. The upgrade should convert to PDF/A, but I cannot find the right script language. Could you please help me with this? Thanks! I'm attaching a screenshot with the new option in Preview.
This is the script I use now, but this only convert to a plain old PDF, but I need the archival version PDF/A:
However, I could not find any documentation for this and especially, I would like to integrate this capability into my AppleScripts, where I convert my Pages documents directly to PDF. The upgrade should convert to PDF/A, but I cannot find the right script language. Could you please help me with this? Thanks! I'm attaching a screenshot with the new option in Preview.
This is the script I use now, but this only convert to a plain old PDF, but I need the archival version PDF/A:
AppleScript:
on run {input, parameters}
repeat with theFile in input
tell application "Finder"
set theFilesFolder to (folder of theFile) as text
set extension hidden of theFile to true
end tell
tell application "Pages"
set theDoc to open theFile
set theDocName to name of theDoc
set theName to (characters 1 thru -1 of theDocName) as text
export theDoc as PDF to file ((theFilesFolder & theName & ".pdf") as text)
close theDoc
end tell
end repeat
return input
end run