PDF/A exporting options (new in macOS) in Preview + AppleScript to convert Pages documents to PDF/A
Hi, I have asked this question before, but the thread is nowhere to be found. I am interested in automating my workflow, where I convert my .pages documents into PDFs, however, before, I needed to go to another step, when I wanted to create a PDF/A. I needed to run the converted PDF through Adobe Acrobats Preflight to create a usable PDF/A version.
Now, that Preview has the ability to create PDF/A docs
(I'm especially interested in the "linearised version which conforms to the PDF/A standard I need to use), I was wondering if AppleScript implemented the needed support for this kind of conversion.
Right now, I use this script to convert the selected .pages docs to PDF:
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
I really wish Apple would implement this directly into the Pages app and support it with scripting.
Can someone knowledgeable check if they added support for PDF/A conversion in applescript? Thanks.
iMac Pro