フリーソフトPopplerのpdftopsコマンドを利用するとPDFをPDFをPostScriptに変換することが出来ます。

PopplerとはPDFビューア(XpdfReader)やPDF解析・変換ツールのフリーソフトです。PopplerはXpdf(フリーソフト)をベースとして機能を拡張して提供されています。
ソースコードも提供されているライブラリとなります。コマンドライン実行のため、VBAや他プログラムからも利用可能となります。
| コマンド |
|---|
| pdftops [options] <PDF-file> [<PS-file>] |
| オプション | |
|---|---|
| -level1 | generate Level 1 PostScript レベル1のPostScriptを生成する |
| -level1sep | generate Level 1 separable PostScript レベル1の分離可能なPostScriptを生成する |
| -level2 | generate Level 2 PostScript レベル2のPostScriptを生成する |
| -level2sep | generate Level 2 separable PostScript レベル2の分離可能なPostScriptを生成する |
| -level3 | generate Level 3 PostScript レベル3のPostScriptを生成する |
| -level3sep | generate Level 3 separable PostScript レベル3の分離可能なPostScriptを生成する |
| -origpagesizes | conserve original page sizes 元のページサイズを維持する |
| -eps | generate Encapsulated PostScript (EPS) カプセル化PostScript(EPS)を生成する |
| -form | generate a PostScript form PostScriptフォームを生成する |
| -opi | generate OPI comments OPI コメントを生成する |
| -r <int> | resolution for rasterization, in DPI (default is 300) ラスタライズの解像度(DPI)(デフォルトは300) |
| -binary | write binary data in Level 1 PostScript レベル1 PostScriptでバイナリデータを書き込む |
| -noembt1 | don't embed Type 1 fonts Type 1フォントを埋め込まない |
| -noembtt | don't embed TrueType fonts TrueTypeフォントを埋め込まない |
| -noembcidps | don't embed CID PostScript fonts CID PostScriptフォントを埋め込まない |
| -noembcidtt | don't embed CID TrueType fonts CID TrueTypeフォントを埋め込まない |
| -passfonts | don't substitute missing fonts 不足しているフォントを代用しない |
| -aaRaster <string> | enable anti-aliasing on rasterization: yes, no ラスタライズ時にアンチエイリアシングを有効にする : yes or no |
| -rasterize <string> | control rasterization: always, never, whenneeded ラスタライズを制御: 常に、常にしない、必要なとき |
| -processcolorformat <string> | color format that is used during rasterization and transparency reduction: MONO8, RGB8, CMYK8 ラスタライズおよび透明度の削減時に使用されるカラー形式: MONO8、RGB8、CMYK8 |
| -processcolorprofile <string> | ICC color profile to use as the process color profile during rasterization and transparency reduction ラスタライズおよび透明度の削減時にプロセス カラー プロファイルとして使用する ICC カラー プロファイル |
| -defaultgrayprofile <string> | ICC color profile to use as the DefaultGray color space DefaultGray カラースペースとして使用する ICC カラープロファイル |
| -defaultrgbprofile <string> | ICC color profile to use as the DefaultRGB color space DefaultRGB カラースペースとして使用する ICC カラープロファイル |
| -defaultcmykprofile <string> | ICC color profile to use as the DefaultCMYK color space DefaultCMYK カラースペースとして使用する ICC カラープロファイル |
| -optimizecolorspace | convert gray RGB images to gray color space グレーのRGB画像をグレーカラースペースに変換する |
| -passlevel1customcolor | pass custom color in level1sep レベル1sepでカスタムカラーを渡す |
| -preload | preload images and forms 画像とフォームをプリロードする |
| -paper <string> | paper size (letter, legal, A4, A3, match) 用紙サイズ (letter, legal, A4, A3, match) |
| -paperw <int> | paper width, in points 用紙幅(ポイント単位) |
| -paperh <int> | paper height, in points 紙の高さ(ポイント単位) |
| -nocrop | don't crop pages to CropBox CropBoxでページをトリミングしない |
| -expand | expand pages smaller than the paper size 用紙サイズより小さいページを拡大する |
| -noshrink | don't shrink pages larger than the paper size 用紙サイズよりも大きいページを縮小しない |
| -nocenter | don't center pages smaller than the paper size 用紙サイズより小さいページを中央に配置しない |
| -duplex | enable duplex printing 両面印刷を有効にする |
| -q | 変換時のメッセージ/エラーメッセージを非表示にします |
| -f <int> | 解析を行うPDFの開始ページを指定します |
| -l <int> | 解析を行うPDFの終了ページを指定します |
| -opw <string> | オーナーパスワード設定されている場合にパスワードを指定します |
| -upw <string> | ユーザーパスワード設定されている場合にパスワードを指定します |
| -v | バージョンとコピーライトを表示します |
| -h | コマンドの使用方法を表示します |
Windows版を使用しています。
pdftops version 24.08.0 Copyright 2005-2024 The Poppler Developers - http://poppler.freedesktop.org Copyright 1996-2011, 2022 Glyph & Cog, LLC Usage: pdftops [options] <PDF-file> [<PS-file>] -f <int> : first page to print -l <int> : last page to print -level1 : generate Level 1 PostScript -level1sep : generate Level 1 separable PostScript -level2 : generate Level 2 PostScript -level2sep : generate Level 2 separable PostScript -level3 : generate Level 3 PostScript -level3sep : generate Level 3 separable PostScript -origpagesizes : conserve original page sizes -eps : generate Encapsulated PostScript (EPS) -form : generate a PostScript form -opi : generate OPI comments -r <int> : resolution for rasterization, in DPI (default is 300) -binary : write binary data in Level 1 PostScript -noembt1 : don't embed Type 1 fonts -noembtt : don't embed TrueType fonts -noembcidps : don't embed CID PostScript fonts -noembcidtt : don't embed CID TrueType fonts -passfonts : don't substitute missing fonts -aaRaster <string> : enable anti-aliasing on rasterization: yes, no -rasterize <string> : control rasterization: always, never, whenneeded -processcolorformat <string> : color format that is used during rasterization and transparency reduction: MONO8, RGB8, CMYK8 -processcolorprofile <string> : ICC color profile to use as the process color profile during rasterization and transparency reduction -defaultgrayprofile <string> : ICC color profile to use as the DefaultGray color space -defaultrgbprofile <string> : ICC color profile to use as the DefaultRGB color space -defaultcmykprofile <string> : ICC color profile to use as the DefaultCMYK color space -optimizecolorspace : convert gray RGB images to gray color space -passlevel1customcolor : pass custom color in level1sep -preload : preload images and forms -paper <string> : paper size (letter, legal, A4, A3, match) -paperw <int> : paper width, in points -paperh <int> : paper height, in points -nocrop : don't crop pages to CropBox -expand : expand pages smaller than the paper size -noshrink : don't shrink pages larger than the paper size -nocenter : don't center pages smaller than the paper size -duplex : enable duplex printing -opw <string> : owner password (for encrypted files) -upw <string> : user password (for encrypted files) -overprint : enable overprint emulation during rasterization -q : don't print any messages or errors -v : print copyright and version info -h : print usage information -help : print usage information --help : print usage information -? : print usage information
| 主な機能 | 概要 |
|---|---|
| pdfattach | PDFファイルに添付ファイルを埋め込みします |
| pdfdetach | PDF内に添付(埋め込み)されているファイルの一覧表示や抽出を行います |
| pdffonts | PDFファイルで使用されているフォントやフォントの埋め込み有無を調べる |
| pdfimages | PDFファイルで使用(埋め込み)されている画像を抽出する |
| pdfinfo | PDFファイルの情報(作成者、作成日時、ページ数など)を表示する |
| pdfseparate | PDFファイルを1ページごとに分割する |
| pdftocairo | PDFファイルを画像に変換する(Cairoベクターグラフィックスを使用) |
| pdftohtml | PDFをHTML形式に変換する |
| pdftoppm | PDFファイルを画像に変換する |
| pdftotext | PDFファイルからテキストを抽出する |
| pdfunite | 複数のPDFファイルをページ結合する |