2011-05-12 2 views
2

AIC (Acrobat Interapplication Communication)를 사용하여 PDF 파일을로드하고 그에 상응하는 포스트 스크립트 파일을 출력하려면 어떻게해야합니까? Acrobat X를 대화식으로 사용하여 파일을 연 다음 파일> 다른 이름으로 저장 ...> 추가 옵션 ...> 포스트 스크립트 메뉴를 사용합니다.AIC를 사용하여 PDF 파일을로드하고 Windows 2008 컴퓨터에서 Postscript를 출력하려면 어떻게합니까?

이상적으로, 나는 기계 콘솔에 창을 표시하지 않고 Windows 서비스 프로그램에서이 작업을하고 싶습니다.

Acrobat X Pro를 설치했으며 Acrobat SDK를 다운로드했습니다.

C#의 코드 샘플을 선호하지만 필요한 경우 VB 나 C++에서 변환 할 수 있습니다.

답변

1

, 적절한 명령 줄은 다음과 같습니다

gswin32c.exe^
    -o output.ps^
    -sDEVICE=ps2write^
    input.pdf 
+0

Ghostscript는 내 요구에 적합한 옵션이 아닙니다. Adobe Acrobat이 필요합니다. – randomfactor

+0

나는 지금 자신을 뒤엎고있다. Enfocus PowerSWITCH가 내가 원하는 바를 정확히 수행 할 수있게 해주는 현명한 코드를 알고 있습니다. 그러나, 그들의 기술은 만족스럽게 해결할 수없는 자바 스크립트 샌드 박스 보안 메커니즘을 해결하기위한 미묘한 magick을 필요로합니다. – randomfactor

+0

Adobe는 Acrobat의 최악의적인 것 같습니다. 왜 그들은 프로그래밍 API를 통해 사용할 수없는 UI에 뭔가를 굽습니까? – randomfactor

0

대신 Ghostscript을 사용하는 것이 더 좋은 방법 일 수 있습니다. 가장 간단한 유스 케이스에서는 명령 행 매개 변수를 사용하는 외부 프로세스로서의 간단한 호출로 변환이 이루어 지지만 포스트 스크립트 가상 프린터를 만드는 것까지 더 나은 통합 방법은 여러 가지가 있습니다.

(v9.02입니다) 고스트 스크립트의 최신 버전에 대한
+0

Ghostscript는 제 목적을위한 옵션이 아닙니다. 제 동료는 고스트 스크립트가 과거에는 많은 인쇄 문제의 원인이었습니다. 모니터에서만 볼 수있는 파일은 인쇄 할 수 있지만 상업 인쇄는 할 수 없습니다. 따라서 나는이 대답을 받아 들일 수 없다. – randomfactor

+0

@randomfactor : Ghostscript는 최근 4-5 버전에서 ** 로트 **를 향상 시켰습니다. 그러나 동료가 옳았습니다 : 옛날'-sDEVICE = pswrite'의 명령 행 스위치는 포스트 스크립트 레벨 1을 출력 했으므로 더 이상 처리하기에는 좋지 않았습니다. 적절하지 않다고 생각하기 전에 가장 최근 버전 (9.02)의'ps2write' 출력에 적어도 시도해야합니다. –

1

당신을위한 또 다른 대안이 명령 줄 스위치와 아크로뱃 리더 (또는 Professional?)를 호출 할 수 있습니다 PDF를 포스트 스크립트로 변환하십시오. Linux (Ubuntu Natty)에서 최소한 Acrobat Reader 9.4.2 버전이 제공하는 것입니다 (Windows 버전이 정확히 동일한 CLI 스위치를 제공하는지는 확실하지 않음).

[email protected]:~$ acroread -help 
Usage: acroread [options] [list of files] 
Run 'acroread -help' to see a full list of available command line options. 
------------------------ 

Options: 
    --display=<DISPLAY>           This option specifies the host and display to use. 
    --screen=<SCREEN>           X screen to use. Use this options to override the screen part of the DISPLAY environment variable. 
    --sync              Make X calls synchronous. This slows down the program considerably. 
    -geometry [<width>x<height>][{+|-}<x offset>{+|-}<y offset>] Set the size and/or location of the document windows. 
    -help              Prints the common command-line options. 
    -iconic              Launches in an iconic state on the desktop. 
    -info              Lists out acroread Installation Root, Version number, Language. 
    -tempFile             Indicates files listed on the command line are temporary files and should not be put in the recent file list. 
    -tempFileTitle <title>          Same as -tempFile, except the title is specified. 
    -toPostScript            Converts the given pdf_files to PostScript. 
    -openInNewInstance           It launches a new instance of acroread process. 
    -openInNewWindow            Same as OpenInNewInstance. But it is recommended to use OpenInNewInstance. openInNewWindow will be deprecated. 
    -installCertificate <server-ip> <server-port>    Fetches and installs client-side certificates for authentication to access the server while creating secured connections. 
    -installCertificate [-PEM|-DER] <PathName>     Installs the certificate in the specified format from the given path to the Adobe Reader Certificate repository. 
    -v, -version             Print version information and quit. 
    /a               Switch used to pass the file open parameters. 


Forms of using -toPostScript 
    -toPostScript [options] pdf_file ... [ps_dir] 
    -toPostScript [options] -pairs pdf_file_1 ps_file_1 ... 
    -toPostScript [options] 
    Note: When using -toPostScript it must be the first argument passed in on the command line. 

Valid options for the conversion of PDF to PostScript: 

    -binary              emit binary PostScript where possible. 
    -start <int>             identify the first page in the document to be converted (default is the first page of the document). 
    -end <int>             identify the last page in the document to be converted (default is the last page of the document). 
    -optimizeForSpeed           emit PostScript such that all fonts are emitted once at the beginning of the document. 
    -landscape             rotate the pages to print landscape. 
    -reverse              reverse the page order of the output. 
    -odd               emit only odd-numbered pages. 
    -even              emit only even-numbered pages. 
    -commentsOff             don't print comments. 
    -annotsOff             don't print annots. 
    -stampsOff             don't print stamps. 
    -markupsOn             print document and markups. 
    -level2              emit Level 2 PostScript. 
    -level3              emit Level 3 PostScript. 
    -printerhalftones           use the printer default halftones. 
    -saveVM              download fonts as needed to preserve printer memory. 
    -shrink              shrink the pages to fit the page size. 
    -expand              expand the pages to fit the page size. 
    -size <pagesize>            set the page size. 
    -transQuality level           set the transparency flattening level. Value from 1-5. 
    -printerName <name>           this is to print device-dependent PS. 
    -rotateAndCenter            auto-rotate and center the pages. 
    -choosePaperByPDFPageSize         use the pdf page size to determine the output tray. 
    -nUp <hpage> <vpage> <pageorder> border rotate    print multiple pages on the same sheet of paper. 
    -booklet <subset> <binding> rotate <from> <to>    prints multiple pages on the same sheet of paper in the order required to read correctly when folded. 


For detailed description on the options please visit the manpage. 
+0

acrobat 또는 acrord32는 Windows에 명령 줄 옵션을 제공하지 않습니다. – randomfactor

+0

@randomfactor : 그건 사실이 아니야! 나는 acrord32.exe **가 ** 인쇄 **를위한 몇 가지 ** 명령 줄 옵션을 제공한다는 사실을 알고 있습니다 ... 나는 단지 리눅스 버전과의 차이점을 모르며, 지금은 너무 게으르다. 이것을 연구하십시오. - 그렇다면이 작업에 Linux를 사용할 수있는 옵션이 아닙니까? –

+0

네, 맞습니다. 나는/h/help를 시도했다 --help /? 평범한 용의자들. 그러나 이것은 지원되지 않는 명령 행 옵션이며 기본 제공 "도움말"메시지는 없습니다. 이 정보는 Adobe Acrobat SDK 개발자 [27 페이지의 FAQ :] (http://partners.adobe.com/public/developer/en/acrobat/sdk/pdf/intro_to_sdk/DeveloperFAQ.pdf)에서 찾을 수 있습니다. – randomfactor

관련 문제