Ich habe dir ein einfaches AppleScript-Droplet gemacht…

PDFExtractPage1.zip [klieme.ch]

Einfach die PDF Dateien draufziehen. Die Originaldokumente werden nicht verändert.
Wenn das Originaldokument nur eine Seite hat wird keine neue Datei erstellt.
Das Droplet ist code-signed.

An die neuen 1-seitigen Dokumente wird der Zusatz "_Page1.pdf" angehängt.

Wen der Code interessiert, es wird AppleScriptObjC und das PDFKit framework (in Quartz enthalten) verwendet.

Show Plain Text
  1. use AppleScript version "2.4" -- Yosemite (10.10) or later
  2. use scripting additions
  3.  
  4. use framework "Quartz"
  5.  
  6. on open theFiles
  7.   repeat with aFile in theFiles
  8.     if kind of (info for aFile) is "PDF document" then
  9.       set filePath to aFile as text
  10.       set newfilePath to text 1 thru -5 of filePath & "_Page1.pdf"
  11.       set newfileURL to (current application's NSURL's fileURLWithPath:(POSIX path of newfilePath))
  12.      
  13.       set thePDF to (current application's PDFDocument's alloc()'s initWithURL:aFile)
  14.       set pageCount to thePDF's pageCount() as integer
  15.       if pageCount > 1 then
  16.         repeat with i from (pageCount - 1) to 1 by -1
  17.           (thePDF's removePageAtIndex:i)
  18.         end repeat
  19.       end if
  20.       (thePDF's writeToURL:newfileURL)
  21.     end if
  22.   end repeat
  23. end open
----------
Gruss

Stefan