2011-01-13 3 views
6

그래서 Ghostscript를 사용하여 PCL 형식으로 작성된 파일을 PostScript로 변환하려고합니다.Ghostscript를 사용하여 PCL을 PostScript로 변환

그건 내 문제의 요지입니다. 나는 단순히 명령 줄에서 실행하려고하지만 마지막 단계에서 lp 명령과 같이 실행해야합니다. lp -d < 무언가가

GPL Ghostscript 9.00 (2010-09-14) 솔라리스 10 서버에서 이걸 실행할 것입니다.하지만 어떤 유닉스 시스템도 비슷하게 작동해야한다고 생각합니다.

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

사용하는 고스트 (gs)-의 읽기 및 PCL을 interprete 수없는. 실행 파일 pspcl6라고 :

당신은 GhostPDL PCL을 interpretes 구성 요소에서 사용해야합니다.

그런

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

같은 명령은 PDF로 PCL을 변환해야합니다. 포스트 스크립트 레벨 2의 경우 -sDEVICE=ps2write을 사용하십시오.

그러나 사전 컴파일 된 바이너리 pspcl6을 찾기가 어려울 수 있습니다. Ghostscript 제품군의 일부 임에도 불구하고 잘 알려지지 않았습니다. 자신의 버전 from the sources을 빌드 + 컴파일해야 할 수도 있습니다.

업데이트 :

관련 문제