AdobeIllustrator

[AppleScript]アートボードサイズでカスタム用紙設定する

広告送稿もAiネイティブPDFになったし
デザイナーさんはディスティラーPDFを何に使っているのか?と思いき
よくある答えが、『サイズを小さくしたい』ってのが多い
メールに添付出来るサイズに…って事らしい。
今の現場はクラウドストレージがあるので
メールに添付する機会も以前より減っているようで
ディスティラーPDFの出番は、昔のように多くは無いのが今


デザイナーさんには、色々な小物をたのまれますが
何で?何のため?ってのも
たまに、あります。
でも
本人気がすむのでしょうから、作って上げる事が多い


『余白0』(ここで言う余白0は『用紙サイズ』と『印刷可能エリア』が同サイズの事)のPDFを
ディスティラーPDFで作るには
余白0のPPDが必要で、多くは『DS TRUEFLOW』か『Adobe PDF 9.0 J』を使って
http://force4u.cocolog-nifty.com/skywalker/2016/01/applescriptsps-.html
カスタムで用紙サイズを指定するわけです

20161224_194321



何で?かしらんが(一応理由は聞いたが、要点を得なかった…苦笑)
ドライバーで指定で印刷したい(PS吐きたい)んだそうだ…

Website_image00281227_223752


結果的には
葉書サイズのアートボードの場合
↓こんな風に、カスタム用紙サイズとして登録されます。

20161224_194748


(*

Ai2CustompapersSize

全面にあるアートボートサイズで
プリンターの用紙設定をします。
(塗りたしサイズではありません)

20161224 初回作成
*)




---余白(設定項目)
set theLeft to "0" as text
set theRight to "0" as text
set theTop to "0" as text
set theBottom to "0" as text
---初期値(設定しなくてもOK
set theId to "" as text
set theName to "" as text
---初期値(ここは設定しなくてもOK
set thePrinter to " " as text
set theCustom to "TRUE" as text
set theWidth to "" as text
set theHeight to "" as text

----ユーザードメインの初期設定フォルダまでのパスを取得
set theUserPrefDirName to (path to preferences folder from user domain) as text
---バックアップ用のディレクトリを作成
try
make new folder at theUserPrefDirName with properties {name:"com.apple.print.custompapers.backup"}
end try
-----ファイル名やらディレクトリ名やら
set thePrefFile to (theUserPrefDirName & "com.apple.print.custompapers.plist") as text
set theBackupDir to (theUserPrefDirName & "com.apple.print.custompapers.backup") as text
set theBackupFileName to (theBackupDir & ":com.apple.print.custompapers.plist") as text
---日付け時間取得
set theTime to (do shell script "date '+%Y%m%d_%k%M%S'") as text
set theNewFileName to ("com.apple.print.custompapers.plist." & theTime & ".plist") as text

----ファイルをコピーしてからファイル名を変更する
tell application "Finder"
try
copy file thePrefFile to folder theBackupDir
delay 1
set the name of file theBackupFileName to theNewFileName
end try
end tell
---イラストレーター
tell application "Adobe Illustrator"
activate
---開いているドキュメント
tell current document
---全面のアードボード
tell artboard 1
---プロパティを取得
set theProp to properties
---アートボードを取得
set theRect to (artboard rectangle of theProp) as list

end tell
end tell
end tell
---各値を取得
set theWl to (item 1 of theRect) as number
set theHt to (item 2 of theRect) as number
set theWr to (item 3 of theRect) as number
set theHb to (item 4 of theRect) as number
---幅と高さを求める
set theWidthPx to theWl - theWr as number
set theHightPx to theHt - theHb as number
---Absolute value絶対値にする
if theWidthPx < 0 then set theWidthPx to -theWidthPx
if theHightPx < 0 then set theHightPx to -theHightPx
---幅と高さをミリに換算
set theWidthMM to (((theWidthPx / 72) * 25.4) as integer) as text
set theHeightMM to (((theHightPx / 72) * 25.4) as integer) as text
---書き込み用の値にする
set theWidth to (theWidthPx) as text
set theHeight to (theHightPx) as text
---書き込み用の値にする(タイトル用にミリ表記)
set theName to (theWidthMM & "x" & theHeightMM) as text
set theId to (theWidthMM & "x" & theHeightMM) as text

--------defaults write com.apple.print.custompapers
-----theName
set theNameCom to "defaults write com.apple.print.custompapers \"" & theName & "\" -dict-add name -string \"" & theName & "\"" as text
set theNameCom to doReplace(theNameCom, "\"\"", "\"")
do shell script theNameCom

-----theId
set theIdCom to "defaults write com.apple.print.custompapers \"" & theName & "\" -dict-add id -string \"" & theId & "\"" as text
set theIdCom to doReplace(theIdCom, "\"\"", "\"")
do shell script theIdCom

-----Printer
set thePrinterCom to "defaults write com.apple.print.custompapers \"" & theName & "\" -dict-add printer -string \"" & thePrinter & "\"" as text
set thePrinterCom to doReplace(thePrinterCom, "\"\"", "\"")
do shell script thePrinterCom

-----Custom
set theCustomCom to "defaults write com.apple.print.custompapers \"" & theName & "\" -dict-add custom -bool " & theCustom & "" as text
set theCustomCom to doReplace(theCustomCom, "\"\"", "\"")
do shell script theCustomCom

-----height
set theHeightCom to "defaults write com.apple.print.custompapers \"" & theName & "\" -dict-add height -float " & theHeight & "" as text
set theHeightCom to doReplace(theHeightCom, "\"\"", "\"")
do shell script theHeightCom

-----width
set theWidthCom to "defaults write com.apple.print.custompapers \"" & theName & "\" -dict-add width -float " & theWidth & "" as text
set theWidthCom to doReplace(theWidthCom, "\"\"", "\"")
do shell script theWidthCom

-----top
set theTopCom to "defaults write com.apple.print.custompapers \"" & theName & "\" -dict-add top -float " & theTop & "" as text
set theTopCom to doReplace(theTopCom, "\"\"", "\"")
do shell script theTopCom

-----bottom
set theBottomCom to "defaults write com.apple.print.custompapers \"" & theName & "\" -dict-add bottom -float " & theBottom & "" as text
set theBottomCom to doReplace(theBottomCom, "\"\"", "\"")
do shell script theBottomCom

-----left
set theLeftCom to "defaults write com.apple.print.custompapers \"" & theName & "\" -dict-add left -float " & theLeft & "" as text
set theLeftCom to doReplace(theLeftCom, "\"\"", "\"")
do shell script theLeftCom

-----right
set theRightCom to "defaults write com.apple.print.custompapers \"" & theName & "\" -dict-add right -float " & theRight & "" as text
set theRightCom to doReplace(theRightCom, "\"\"", "\"")
do shell script theRightCom

return "Done"

--------------文字の置き換えサブルーチン
to doReplace(theText, theOrgStr, theNewStr)
set theOldDelim to AppleScript's text item delimiters
set AppleScript's text item delimiters to theOrgStr
set theTmpList to every text item of theText
set AppleScript's text item delimiters to theNewStr
set theReplaceStr to theTmpList as text
set AppleScript's text item delimiters to theOldDelim
return theReplaceStr
end doReplace


インストール先はCS6ならこちら

Website_image00281227_224809

ここから実行です

Website_image00281227_224822

細かい
エラー制御していません。

「Ai2CustompapersSize.zip」をダウンロード

|

鵜呑みにせずに、自分で確認する事を習慣にしないとね

『CS6で平成角ゴシックを使いたい』に反応
https://forums.adobe.com/message/7768980

OS9時代のフォントをOSXで利用する事がライセンス的にOKなのか?は別な話として

Illustrator CS5&CS6+10.6xでTTタイプ&スーツケース式のフォントは普通に使える
回答者がCCで使えるといった事なので『OS依存』でも無いと『思われる』ため
10.9環境が手元に無いのでナニだが
質問者と回答者両方が同じ『環境依存』の不具合になっているんじゃないかい?

Website_image00270719_22956


Website_image00270719_25752


ちゃんとキャッシュクリアすれば認識すると思うけどなぁ


|

CollectForOutput

CollectForOutputで
埋め込み画像もリンク先(元の)が通れば
保存したいとの要望


Collectforoutput0


現場でちょっとたのまれて、変更して利用してもらった


Collectforoutput1

制御としては間違っているとは思うが
その場で対応だったので、結果が良ければ良い…的な…笑

「CollectForOutput.rtf」をダウンロード


|

【メモ】WACOMタブレットドライバ削除

WACOMのドライバーって悪さする事が多いので
メモ
CC CC2014でAiが起動不良になった時に疑う事<<自分


/Library/Application Support/Tablet
/Library/Application Support/Inkling

/Library/PreferencePanes/PenTablet.prefPane
/Library/PreferencePanes/WacomTablet.prefPane


/Applications/Pen Tablet.localized
/Applications/Wacom Tablet.localized

/Library/LaunchAgents/com.wacom.wacomtablet.plist
/Library/LaunchAgents/com.wacom.pentablet.plist

/Library/Preferences/Tablet

/System/Library/Extensions/Wacom Tablet.kex
/System/Library/Extensions/Pen Tablet.kext
/System/Library/Extensions/TabletDriverCFPlugin.bundle

/Library/Internet Plug-Ins/WacomTabletPlugin.plugin
/Library/Internet Plug-Ins/WacomNetscape.plugin
/Library/Internet Plug-Ins/WacomSafari.plugin


/Library/Frameworks/WacomMultiTouch.framework

----留意USBドライバにつき他の接続機器に留意
/Library/Extensions/FTDIKext.kext
/System/Library/Extensions/SiLabsUSBDriver64.kext
/System/Library/Extensions/SiLabsUSBDriver.kext


try
do shell script (("sudo touch '/Library/Application Support/Tablet'") as text) with administrator privileges
do shell script (("sudo rm -Rf '/Library/Application Support/Tablet'") as text) with administrator privileges
end try
try
do shell script (("sudo touch '/Library/Application Support/Inkling'") as text) with administrator privileges
do shell script (("sudo rm -Rf '/Library/Application Support/Inkling'") as text) with administrator privileges
end try

try
do shell script (("sudo touch '/Library/PreferencePanes/PenTablet.prefPane'") as text) with administrator privileges
do shell script (("sudo rm -Rf '/Library/PreferencePanes/PenTablet.prefPane'") as text) with administrator privileges
end try
try
do shell script (("sudo touch '/Library/PreferencePanes/WacomTablet.prefPane'") as text) with administrator privileges
do shell script (("sudo rm -Rf '/Library/PreferencePanes/WacomTablet.prefPane'") as text) with administrator privileges
end try

try
do shell script (("sudo touch '/Applications/Pen Tablet.localized'") as text) with administrator privileges
do shell script (("sudo rm -Rf '/Applications/Pen Tablet.localized'") as text) with administrator privileges
end try
try
do shell script (("sudo touch '/Applications/Wacom Tablet.localized'") as text) with administrator privileges
do shell script (("sudo rm -Rf '/Applications/Wacom Tablet.localized'") as text) with administrator privileges
end try

try
do shell script (("sudo touch '/Library/LaunchAgents/com.wacom.wacomtablet.plist'") as text) with administrator privileges
do shell script (("sudo rm -Rf '/Library/LaunchAgents/com.wacom.wacomtablet.plist'") as text) with administrator privileges
end try
try
do shell script (("sudo touch '/Library/LaunchAgents/com.wacom.pentablet.plist'") as text) with administrator privileges
do shell script (("sudo rm -Rf '/Library/LaunchAgents/com.wacom.pentablet.plist'") as text) with administrator privileges
end try

try
do shell script (("sudo touch '/Library/Preferences/Tablet'") as text) with administrator privileges
do shell script (("sudo rm -Rf '/Library/Preferences/Tablet'") as text) with administrator privileges
end try
try
do shell script (("sudo touch '/Library/Preferences/Inkling'") as text) with administrator privileges
do shell script (("sudo rm -Rf '/Library/Preferences/Inkling'") as text) with administrator privileges
end try


try
do shell script (("sudo touch '/Library/Internet Plug-Ins/WacomTabletPlugin.plugin'") as text) with administrator privileges
do shell script (("sudo rm -Rf '/Library/Internet Plug-Ins/WacomTabletPlugin.plugin'") as text) with administrator privileges
end try

try
do shell script (("sudo touch '/Library/Internet Plug-Ins/WacomNetscape.plugin'") as text) with administrator privileges
do shell script (("sudo rm -Rf '/Library/Internet Plug-Ins/WacomNetscape.plugin'") as text) with administrator privileges
end try
try
do shell script (("sudo touch '/Library/Internet Plug-Ins/WacomSafari.plugin'") as text) with administrator privileges
do shell script (("sudo rm -Rf '/Library/Internet Plug-Ins/WacomSafari.plugin'") as text) with administrator privileges
end try

try
do shell script (("sudo touch '/Library/Frameworks/WacomMultiTouch.framework'") as text) with administrator privileges
do shell script (("sudo rm -Rf '/Library/Frameworks/WacomMultiTouch.framework'") as text) with administrator privileges
end try

try
do shell script (("sudo mkdir -p '/System/Library/Extensions Disabled'") as text) with administrator privileges
try
do shell script (("sudo kextunload '/System/Library/Extensions/SiLabsUSBDriver.kext'") as text) with administrator privileges
end try

do shell script (("sudo touch '/System/Library/Extensions/SiLabsUSBDriver.kext'") as text) with administrator privileges
do shell script (("mv -f '/System/Library/Extensions/SiLabsUSBDriver.kext' '/System/Library/Extensions Disabled'") as text) with administrator privileges
do shell script (("sudo rm -Rf '/System/Library/Extensions Disabled/SiLabsUSBDriver.kext'") as text) with administrator privileges

end try


try
do shell script (("sudo mkdir -p '/System/Library/Extensions Disabled'") as text) with administrator privileges
try
do shell script (("sudo kextunload '/System/Library/Extensions/Pen Tablet.kext'") as text) with administrator privileges
end try
do shell script (("sudo touch '/System/Library/Extensions/Pen Tablet.kext'") as text) with administrator privileges
do shell script (("mv -f '/System/Library/Extensions/Pen Tablet.kext' '/System/Library/Extensions Disabled'") as text) with administrator privileges
do shell script (("sudo rm -Rf '/System/Library/Extensions Disabled/Pen Tablet.kext'") as text) with administrator privileges

end try


try
do shell script (("sudo mkdir -p '/System/Library/Extensions Disabled'") as text) with administrator privileges
try
do shell script (("sudo kextunload '/System/Library/Extensions/TabletDriverCFPlugin.bundle'") as text) with administrator privileges
end try
do shell script (("sudo touch '/System/Library/Extensions/TabletDriverCFPlugin.bundle'") as text) with administrator privileges
do shell script (("mv -f '/System/Library/Extensions/TabletDriverCFPlugin.bundle' '/System/Library/Extensions Disabled'") as text) with administrator privileges
do shell script (("sudo rm -Rf '/System/Library/Extensions Disabled/TabletDriverCFPlugin.bundle'") as text) with administrator privileges

end try

try
do shell script (("sudo mkdir -p '/Library/Frameworks Disabled'") as text) with administrator privileges
do shell script (("sudo touch '/Library/Frameworks/WacomMultiTouch.framework'") as text) with administrator privileges
do shell script (("mv -f '/Library/Frameworks/WacomMultiTouch.framework' '/Library/Frameworks Disabled'") as text) with administrator privileges
do shell script (("sudo rm -Rf '/Library/Frameworks Disabled/WacomMultiTouch.framework'") as text) with administrator privileges

end try

try
do shell script (("sudo mkdir -p '/Library/Extensions Disabled'") as text) with administrator privileges
try
do shell script (("sudo kextunload '/Library/Extensions/FTDIKext.kext'") as text) with administrator privileges
end try
do shell script (("sudo touch '/Library/Extensions/FTDIKext.kext'") as text) with administrator privileges
do shell script (("mv -f '/Library/Extensions/FTDIKext.kext' '/Library/Extensions Disabled'") as text) with administrator privileges
do shell script (("sudo rm -Rf '/Library/Extensions Disabled/FTDIKext.kext'") as text) with administrator privileges
end try


try
do shell script (("sudo mkdir -p '/System/Library/Extensions Disabled'") as text) with administrator privileges
try
do shell script (("sudo kextunload '//System/Library/Extensions/SiLabsUSBDriver64.kext'") as text) with administrator privileges
end try
do shell script (("sudo touch '/System/Library/Extensions/SiLabsUSBDriver64.kext'") as text) with administrator privileges
do shell script (("mv -f '/System/Library/Extensions/SiLabsUSBDriver64.kext' '/System/Library/Extensions Disabled'") as text) with administrator privileges
do shell script (("sudo rm -Rf '/System/Library/Extensions Disabled/SiLabsUSBDriver64.kext'") as text) with administrator privileges
end try


try
do shell script (("sudo mkdir -p '/System/Library/Extensions Disabled'") as text) with administrator privileges
try
do shell script (("sudo kextunload '/System/Library/Extensions/SiLabsUSBDriver.kext'") as text) with administrator privileges
end try
do shell script (("sudo touch '/System/Library/Extensions/SiLabsUSBDriver.kext'") as text) with administrator privileges
do shell script (("mv -f '/System/Library/Extensions/SiLabsUSBDriver.kext' '/System/Library/Extensions Disabled'") as text) with administrator privileges
do shell script (("sudo rm -Rf '/System/Library/Extensions Disabled/SiLabsUSBDriver.kext'") as text) with administrator privileges
end try



「Tablet.scpt.zip」をダウンロード

「Tablet.txt」をダウンロード


一部修正しました
https://github.com/force4u/del4Tablet.scpt

「del4Tablet.scpt.zip」をダウンロード


|

Adobe Illustrator CC 2014 SDK & Scripting Guide

Scripting Guide

Adobe Illustrator CC 2014 Scripting Guide


http://www.adobe.com/devnet/illustrator/scripting.html


------------------


Adobe Illustrator CC 2014 SDK

Adobe Illustrator CC 2014 SDK

Adobe Illustrator CC SDK

Adobe Illustrator CC SDK

  1. Adobe Illustrator CC SDK ReadMe
  2. Adobe Illustrator CC Programmers Guidefile
  3. Adobe Illustrator CC Porting Guidefile
  4. Getting Started with Adobe Illustrator CC Developmentfile
  5. Using the Adobe Text Enginefile
Adobe Illustrator CS6 SDK

Adobe Illustrator CS6 SDK

  1. Adobe Illustrator CS6 SDK ReadMe (TXT, 9k)
  2. Adobe Illustrator CS6 Porting Guidefile
  3. Getting Started with Adobe Illustrator CS6 Developmentfile
  4. Using the Adobe Text Enginefile
Adobe Illustrator CS6 SDK

Adobe Illustrator CS5 SDK

  1. Adobe Illustrator CS5 SDK ReadMe (TXT, 9k)
  2. Adobe Illustrator CS5 Porting Guidefile
  3. Getting Started with Adobe Illustrator CS5 Developmentfile
  4. Using the Adobe Text Enginefile
Adobe Illustrator CS4 SDK

Adobe Illustrator CS4 SDK

  1. Adobe Illustrator CS4 SDK ReadMe  (TXT, 14k)
Adobe Illustrator CS3 SDK

Adobe Illustrator CS3 SDK

  1. Readme  (TXT)
  2. FAQ  (TXT) (November 2007)
  3. FAQ (TXT) (November 2007)
Adobe Illustrator CS2 SDK

Adobe Illustrator CS2 SDK

  1. Illustrator CS2 SDK for Macintosh  (ZIP, 7.3M)
  2. Illustrator CS2 SDK for Windows  (ZIP, 6.97M)
Adobe Illustrator CS SDK

Adobe Illustrator CS SDK

  1. Illustrator CS SDK for Macintosh  (HQX, 7.3M)
  2. Illustrator CS SDK for Windows (ZIP, 6.9M)

|

ふ〜ん(Toggle_fixBadPluginGlobalObjectNames.jsx )

Website_image00260604_232551


コピー&ペースト処理が遅くなるかファイルサイズが増加する(Illustrator CS/CS2/CS3/CS4/CS5.x/CS6/CC)

|

色域外の色を保持する

OKWAVEの回答を自分流で

------質問内容ここから
illustratorで箱の絵を作成し色をカラーピッカーで#ff69b4にしたいのですが
#E868A2に変更されてしまいます。どうしたら#ff69b4にすることができるのでしょうか?
-------ここまで

まぁ、カラー設定も関係しますし
CMYK色域外なら普通のレーザープリンター等では
再現出来ない可能性が高いわけですから…汗
なんらか?の理由があって、「どうしてもその色指定」したいなら
特色指定ですかね

Website_image20131230_15532


でも
そんなデーターには関わりたくないなぁ…笑

(CMYKである必要がないなら文書のカラーモードをRGBで解決ですけど…)
 

|

[Ai]0.1pt等細すぎる線がダメな理由

0.1ptの線を分割(パスのアウトラインでも結果は同じ)
Website_image20120205_125840


まるまる1年以上DTPの仕事から離れていたので
久しぶりに色々やると
まぁ〜忘れてる忘れてる......汗

Website_image20120205_130829


チェック入れて作業して
分割してガッカリ

またビギナーに逆戻りだなぁトホホホ

|

[profiles.google.com]新しいプロフィールページ用のテンプレート【ai】

786x374_quicktimer_20110309_01


「google_plofile.zip」をダウンロード

続きを読む "[profiles.google.com]新しいプロフィールページ用のテンプレート【ai】"

| | コメント (0) | トラックバック (0)

Scriptographer

Image00230208_14448

Scriptographer.org - DownloadScriptographer.org - Download:新しいウィンドで開きます

| | コメント (0) | トラックバック (0)

その他のカテゴリー

Accessibility | AccessibilityCheck | AccessibilityForm | AccessibilityInDesign | AccessibilityPDF | Acrobat | Acrobat Action | Acrobat Annotation | Acrobat AppleScript | Acrobat Layer | Acrobat Plug-ins | Acrobat Portfolios | Acrobat Print | AcrobatBarcode | AcrobatDialog | AcrobatForm | AcrobatJS | AcrobatMenu | AcrobatPDF | AcrobatStamp | AcrobatYouTube | AddressBook | Adobe | Adobe InDesign | AdobeAppleScript | AdobeBridge | AdobeIllustrator | AdobeJSX | aed | Alfresco | Android | AnimationGif | Apple | AppleScript | AppleScriptBasics | AppleScriptCharacter | AppleScriptColor | AppleScriptDroplet | AppleScriptErrorNum | AppleScriptFolder | AppleScriptFontBook | AppleScriptRename | AppleScriptTools | AppleSymbols | Applications | Barcode | Barcode2D | BarcodePostal | BetterHTMLExport | Book | Browser | buzz | Certificates | CharacterEntity | CharacterSets | Colors | Cool Site | CSS | Cutting | DecoMail | DecorationMail | Design | Desktop | Diff | DJ | dmg | DNS | Documents | Download | eBook | Editer | eMail | Envelopes | ExifTool | Facebook | FFmpeg | File System | Fonts | FontsTool | FontsWeb | FOOD | FormPrint | ftp | Gadget | Gif Animation | Google | HexEditor | HTML | info | iPhoto | ISBN | ISO | iTunes | iWork | iWorkNumbers | iWorkNumbersCalendar | iWorkNumbersTimecard | iWorkPages | JavaScript | JeditX | JeditX Regexp | JeditXAppleScript | JIS | jquery | Letterpress | Library | logo | Mac Admin | Mac Archiver | Mac Browser | Mac Browser Plugin | Mac QuickLook | Mac Spotlight | Mac Video | Map | Mobby | Moto | Movies | Music | Network Basic | ntp | OCR | Office | OSX | Pantone | Paper | PDFlib | Permission | Photo | Pictograms | Print | Public | QuickLook | QuickTime | QuickTimeSetting | QuickTimeSound | Real Media | ReName | ResourceFork | ruby | Screen | ScreenCast | Search | Security | SEO | Sharing | SLAResource | Spotlight | Stamp | SWF | Tutorial PSD | TV | Twitter | Typography | Unicode | Utilities | Video | WebFont | Wedding | Windows | WindowsMedia | XML | XMP | XPS | YouTube | YouTube Rss