LoginSignup
4

More than 5 years have passed since last update.

PDFデータからDXFデータへ変換する方法

Last updated at Posted at 2016-07-12

pstoeditを使いました。

Macの場合

Homebrewをインストールし,以下のコマンドでpstoeditをインストール。

pstoeditのインストール
brew install pstoedit

以下のコマンドで変換。

dxfへ変換
pstoedit -f dxf_s PDFファイルのパス DXFファイルのパス

毎回コマンド打つのは大変なのでAutomatorでアプリケーションとして保存しました。

Automator

Automator
#!/bin/zsh
source ~/.zshrc

while read i ; do
    FILE_PATH=$i
    DIR="${FILE_PATH%/*}"
    FILE_NAME=`basename $FILE_PATH .pdf`
    DXF_NAME=$FILE_NAME.dxf
    pstoedit -f dxf_s $FILE_PATH $DIR/$DXF_NAME
done

起動時に複数のPDFファイルを選択すると同じ場所にdxfデータを出力してくれます。

色分けした部分はDXFでレイヤー分けしてくれるので後々の加工も簡単になります。

Test Data

レーザー加工機で加工してキーホルダーにしました。

テスト

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4