[Acrobat AppleScript]PDFを開いてTIFFで書き出す(バージョンによる差異)
set ChkFileType to 0
set theNewFileExetension to "tiff" as Unicode text
set theFileResult to choose file "変更するファイルを選択"
set ObjInfo to info for theFileResult
set theFullFileName to name of ObjInfo as Unicode text
set theExtName to name extension of ObjInfo as Unicode text
set theCntFullFileName to the length of characters of theFullFileName as integer
set theCntExtName to the length of characters of theExtName as integer
set theFileName to characters 1 thru (theCntFullFileName - theCntExtName - 1) of theFullFileName as Unicode text
set theNewFullFileName to theFileName & "." & theNewFileExetension as Unicode text
set theSaveFolder to choose folder with prompt ("ファイルの保存先を選択してください。" as Unicode text)
set theDestinationFolder to theSaveFolder as Unicode text
set thenewFolderPass to POSIX path of theDestinationFolder as Unicode text
set theNewFilePass to thenewFolderPass & theNewFullFileName as Unicode text
---ファイルタイプ判定
if theExtName is "pdf" then
set ChkFileType to 1
else if theExtName is "PDF" then
set ChkFileType to 1
end if
if ChkFileType is 1 then
tell application "Adobe Acrobat Pro"
open theFileResult as alias
----Acrobat6互換
---do script "this.saveAs(\"" & newfilepass & "\", \"com.adobe.acrobat.tiff\");"
----Acrobat7互換
do script "this.saveAs(\"" & theNewFilePass & "\", \"com.adobe.acrobat.tiff\", \"bPromptToOverwrite: true\" , \"bCopy: true\" );"
close active doc saving no
end tell
end if
| 固定リンク
「Acrobat AppleScripts」カテゴリの記事
- 【Acrobat】Acrobatフォームでデータ印字(はがき宛名)(2021.08.22)
- 【Acrobat AppleScripts】フルスクリーン開始(2021.08.05)
- [Acrobat AppleScripts]アプリケーションの画面サイズ(2021.05.03)
- [Acrobat AppleScript]PDFを開いてTIFFで書き出す(バージョンによる差異)(2011.04.08)
- [Acrobat AppleScript]ファイルサイズの取得(this.filesize)(2011.03.30)