Illustrator has problems opening PDF file editing
I use AppleScript to open PDF files for processing. After saving, the PDF file only keeps the pages I opened, and the other pages are gone.
For example, my PDF has 8 pages, I opened the first page for processing and saving, and the remaining 7 pages disappeared after saving.
set user interaction level to never interact
set page of PDF file options of settings to "2"
open file fileToOpen without dialogs
set theDoc to the front document
tell theDoc
rasterize source art page items with options {resolution:450}
end tell
save theDoc
close theDoc
set user interaction level to interact with all
