AppleScript名:指定PDFの最初のページからアノテーションを削除する |
— Created 2017-06-09 by Takaaki Naganoya — 2017 Piyomaru Software use AppleScript version "2.4" use scripting additions use framework "Foundation" use framework "Quartz" set aHFSPath to (choose file of type {"com.adobe.pdf"} with prompt "Choose a PDF with Annotation") set aPOSIX to POSIX path of aHFSPath set aURL to (current application’s |NSURL|’s fileURLWithPath:aPOSIX) set aPDFdoc to current application’s PDFDocument’s alloc()’s initWithURL:aURL set pCount to aPDFdoc’s pageCount() set firstPage to (aPDFdoc’s pageAtIndex:0) set anoList to (firstPage’s annotations()) as list repeat with i in anoList (firstPage’s removeAnnotation:i) end repeat aPDFdoc’s writeToFile:aPOSIX |
More from my site
(Visited 24 times, 1 visits today)