Content-Length: 86598 | pFad | https://uske-s.hatenablog.com/entry/2022/02/22/092701

Acrobat DCのスクリプティング 1 - DTPab

DTPab

印刷やデザイン、アドビ製アプリやスクリプトなど、雑多な技術ブログ

Acrobat DCのスクリプティング 1

あまりに情報がないのでメモとして残しておきます。

実行環境

  • macOS 11.6.3 (Big Sur)
  • Acrobat Pro DC (Continuous Release) v2019.008.20071

Acrobat DCでJSを操作する前に…

  • 公式ドキュメント(英語)
    Documentation — Acrobat DC SDK
    f:id:uske_S:20220222085447p:plain
    APIリファレンスはここ
  • 環境設定 > JavaScript > Acrobat JavaScriptを使用 をオン
    f:id:uske_S:20220222090602p:plain
  • JavaScriptツールからデバッガーを開く
    f:id:uske_S:20220222091318p:plain
    Acrobatの内蔵デバッガー

これで準備完了

コードの実行

オブジェクトモデルについては前掲のPDFを参照。
デバッガーのコンソールに適当にコードを入力。

f:id:uske_S:20220222091638p:plain

実行したいコードを選択して(全選択でよい)⌘+Enter(もしくはテンキーのEnter)*1を押すとスクリプトが実行される。
実行してみると分かりますが、実行結果が記述したスクリプトの末尾に直接書き込まれるというクソ仕様です。

一旦ここまで。

*1:前掲のドキュメントのp.29「Parameter help」の項に「While the cursor is still on the line just entered, press either Ctrl + Enter or the Enter key on the numeric pad.」とある









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://uske-s.hatenablog.com/entry/2022/02/22/092701

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy