2011-01-13 23 views
6

Ghostscriptを使用して、PCL形式で作成されたファイルをPostScriptに変換します。Ghostscriptを使用してPCLをPostScriptに変換する

これは私の問題の要点です。私は単純に、コマンドライン上でそれを実行しようとしていますが、最終段階では、それはlpコマンドで実行する必要がありますよう LPは(2010-09-14)

GPL Ghostscriptの9.00 < GSに何か何かを-d 私はこれをSolaris 10サーバーで実行しますが、どのUNIXシステムも同様に動作するはずです。

bash-3.00# /usr/local/bin/gs -sDEVICE=pswrite  -dLanguageLevel=1  -dNOPAUSE -dBATCH -dSAFER  -sOutputFile=output.ps cms-form.pcl 
GPL Ghostscript 9.00 (2010-09-14) 
Copyright (C) 2010 Artifex Software, Inc. All rights reserved. 
This software comes with NO WARRANTY: see the file PUBLIC for details. 
Error: /undefined in &k2G-210z100u0l6d0e63fa0V 
Operand stack: 

Execution stack: 
    %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1910 1 3 %oparray_pop 1909 1 3 %oparray_pop 1893 1 3 %oparray_pop 1787 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- 
Dictionary stack: 
    --dict:1154/1684(ro)(G)-- --dict:0/20(G)-- --dict:77/200(L)-- 
Current allocation mode is local 
Current file position is 30 
GPL Ghostscript 9.00: Unrecoverable error, exit code 1 

答えて

7

あなたが使用しているGhostscriptのgs)、-で読み、PCLをinterpreteことができません。実行可能ファイルがpspcl6と呼ばれる:

あなたはGhostPDL PCLをinterpretesコンポーネントから使用する必要があります。

その後

pspcl6^
    -o out.pdf^
    -sDEVICE=pdfwrite^
    in.pcl 

のようなコマンドは、PDFへのあなたのPCLを変換する必要があります。 PostScriptレベル2の場合は-sDEVICE=ps2writeを使用します。

しかし、pspcl6というプリコンパイルされたバイナリを見つけるのは難しいかもしれません。それはGhostscriptファミリーの一部であるにもかかわらず、よく知られていません。独自のバージョンfrom the sourcesをビルド+コンパイルする必要があるかもしれません。

更新:

関連する問題