[Print]キーノートとパワーポイントのデフォルト用紙サイズをカスタム用紙サイズに追加
(************************************************************************
↑この上の▶︎をぽっちっとしてください
PPDファイルの用紙サイズを
カスタム用紙サイズに登録します
パワーポイントのデフォルト用紙サイズPowerPoint(960x540)
キーノートのデフォルト用紙サイズKeyNote(1920x1080)
************************************************************************)
set theTop to (0) as real
set theLeft to (0) as real
set theRight to (0) as real
set theBottom to (0) as real
set thePrinter to " " as text
set theCustom to "TRUE" as text
(*###########defaults write com.apple.print.custompapers*)
set theDictName to "PowerPoint(960x540)" as text
set theName to "PowerPoint(960x540)" as text
set theId to "PowerPoint(960x540)" as text
set theWidth to "960" as number
set theHeight to "540" as number
-----theName
set theNameCom to "defaults write com.apple.print.custompapers \"" & theDictName & "\" -dict-add name -string \"" & theName & "\"" as text
do shell script theNameCom
-----theId
set theIdCom to "defaults write com.apple.print.custompapers \"" & theDictName & "\" -dict-add id -string \"" & theId & "\"" as text
do shell script theIdCom
-----height
set theHeightCom to "defaults write com.apple.print.custompapers \"" & theDictName & "\" -dict-add height -float " & theHeight & "" as text
do shell script theHeightCom
-----width
set theWidthCom to "defaults write com.apple.print.custompapers \"" & theDictName & "\" -dict-add width -float " & theWidth & "" as text
do shell script theWidthCom
-----Printer
set thePrinterCom to "defaults write com.apple.print.custompapers \"" & theDictName & "\" -dict-add printer -string \"" & thePrinter & "\"" as text
do shell script thePrinterCom
-----Custom
set theCustomCom to "defaults write com.apple.print.custompapers \"" & theDictName & "\" -dict-add custom -bool " & theCustom & "" as text
do shell script theCustomCom
-----top
set theTopCom to "defaults write com.apple.print.custompapers \"" & theDictName & "\" -dict-add top -float " & theTop & "" as text
do shell script theTopCom
-----bottom
set theBottomCom to "defaults write com.apple.print.custompapers \"" & theDictName & "\" -dict-add bottom -float " & theBottom & "" as text
do shell script theBottomCom
-----left
set theLeftCom to "defaults write com.apple.print.custompapers \"" & theDictName & "\" -dict-add left -float " & theLeft & "" as text
do shell script theLeftCom
-----right
set theRightCom to "defaults write com.apple.print.custompapers \"" & theDictName & "\" -dict-add right -float " & theRight & "" as text
do shell script theRightCom
(*###########defaults write com.apple.print.custompapers*)
set theDictName to "KeyNote(1920x1080)" as text
set theName to "KeyNote(1920x1080)" as text
set theId to "KeyNote(1920x1080)" as text
set theWidth to "1920" as number
set theHeight to "1080" as number
-----theName
set theNameCom to "defaults write com.apple.print.custompapers \"" & theDictName & "\" -dict-add name -string \"" & theName & "\"" as text
do shell script theNameCom
-----theId
set theIdCom to "defaults write com.apple.print.custompapers \"" & theDictName & "\" -dict-add id -string \"" & theId & "\"" as text
do shell script theIdCom
-----height
set theHeightCom to "defaults write com.apple.print.custompapers \"" & theDictName & "\" -dict-add height -float " & theHeight & "" as text
do shell script theHeightCom
-----width
set theWidthCom to "defaults write com.apple.print.custompapers \"" & theDictName & "\" -dict-add width -float " & theWidth & "" as text
do shell script theWidthCom
-----Printer
set thePrinterCom to "defaults write com.apple.print.custompapers \"" & theDictName & "\" -dict-add printer -string \"" & thePrinter & "\"" as text
do shell script thePrinterCom
-----Custom
set theCustomCom to "defaults write com.apple.print.custompapers \"" & theDictName & "\" -dict-add custom -bool " & theCustom & "" as text
do shell script theCustomCom
-----top
set theTopCom to "defaults write com.apple.print.custompapers \"" & theDictName & "\" -dict-add top -float " & theTop & "" as text
do shell script theTopCom
-----bottom
set theBottomCom to "defaults write com.apple.print.custompapers \"" & theDictName & "\" -dict-add bottom -float " & theBottom & "" as text
do shell script theBottomCom
-----left
set theLeftCom to "defaults write com.apple.print.custompapers \"" & theDictName & "\" -dict-add left -float " & theLeft & "" as text
do shell script theLeftCom
-----right
set theRightCom to "defaults write com.apple.print.custompapers \"" & theDictName & "\" -dict-add right -float " & theRight & "" as text
do shell script theRightCom
set theCommandText to ("open \"/System/Library/PreferencePanes/PrintAndScan.prefPane\"") as text
do shell script theCommandText
display notification "処理終了" with title "処理が終了" subtitle "処理が終了しました" sound name "Sonumi"
log "\r\r>>>>>>>>>>>>処理終了<<<<<<<<<<<<<<<\r\r"
"\r\r>>>>>>>>>>>>終了しました<<<<<<<<<<<<<<<\r\r"
| 固定リンク
「Print」カテゴリの記事
- [macOS13]CUPS2.3.4での混乱(2023.07.06)
- [Print]キーノートとパワーポイントのデフォルト用紙サイズをカスタム用紙サイズに追加(2021.11.21)
- プリンターCUPSのリセット(2021.11.04)
- PostScriptとサイズの数値の丸めの違い(2021.07.04)
- [AppleScripts]PS書出し用のバーチャルプリンタを追加する(簡易版)(2021.07.04)