1

centos で「pdf.pdf」ファイルを変換しています。

gs -sDEVICE=pdfwrite -dNOOUTERSAVE -dNOPAUSE -dBATCH -dPDFA=1 -dUseCIEColor -sProcessColorModel=DeviceCMYK -sOutputFile=out.pdf PDFA_def.ps pdf.pdf

私の PDFA_def.ps は次のようになります。

[root@localhost Downloads]# cat PDFA_def.ps 
%!
% This is a sample prefix file for creating a PDF/A document.
% Feel free to modify entries marked with "Customize".

% This assumes an ICC profile to reside in the file (ISO Coated sb.icc),
% unless the user modifies the corresponding line below.

% Define entries in the document Info dictionary :

/ICCProfile (/usr/share/ghostscript/9.07/iccprofiles/default_cmyk.icc)
def

[ /Title (MyTitle)                  % Customize.
  /DOCINFO pdfmark

% Define an ICC profile :

[/_objdef {icc_PDFA} /type /stream /OBJ pdfmark
[{icc_PDFA} <</N systemdict /ProcessColorModel get /DeviceGray eq {1} {4} ifelse >> /PUT pdfmark
[{icc_PDFA} ICCProfile (r) file /PUT pdfmark

% Define the output intent dictionary :

[/_objdef {OutputIntent_PDFA} /type /dict /OBJ pdfmark
[{OutputIntent_PDFA} <<
  /Type /OutputIntent             % Must be so (the standard requires).
  /S /GTS_PDFA1                   % Must be so (the standard requires).
  /DestOutputProfile {icc_PDFA}            % Must be so (see above).
  /OutputConditionIdentifier (CGATS TR001)      % Customize
>> /PUT pdfmark
[{Catalog} <</OutputIntents [ {OutputIntent_PDFA} ]>> /PUT pdfmark

そしてエラーが発生します:

[root@localhost Downloads]# gs -sDEVICE=pdfwrite -dNOOUTERSAVE -dNOPAUSE -dBATCH -dPDFA=1 -dUseCIEColor -sProcessColorModel=DeviceCMYK -sOutputFile=out.pdf PDFA_def.ps pdf.pdf
GPL Ghostscript 9.07 (2013-02-14)
Copyright (C) 2012 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Error: /undefinedfilename in --file--
Operand stack:
   --nostringval--   --nostringval--   (ISO Coated sb.icc)   (r)
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1884   1   3   %oparray_pop   1883   1   3   %oparray_pop   1867   1   3   %oparray_pop   1755   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:1168/1684(ro)(G)--   --dict:0/20(G)--   --dict:78/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
Current file position is 627
GPL Ghostscript 9.07: Unrecoverable error, exit code 1

手伝って頂けますか?現在、いくつかのメタデータなしで、pdfをpdfaに変換する必要があります。

4

0 に答える 0