Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux 无法使用GhostScript将pdf转换为pdfa_Linux_Pdf_File Conversion_Pdfa - Fatal编程技术网

Linux 无法使用GhostScript将pdf转换为pdfa

Linux 无法使用GhostScript将pdf转换为pdfa,linux,pdf,file-conversion,pdfa,Linux,Pdf,File Conversion,Pdfa,我正在centos上转换我的“pdf.pdf”文件: gs-sDEVICE=pdfwrite-dNOOUTERSAVE-dNOPAUSE-dBATCH-dPDFA=1-dusececolor-sProcessColorModel=DeviceCMYK-sOutputFile=out.pdf PDFA_def.ps pdf.pdf 我的PDFA_def.ps如下所示: [root@localhost Downloads]# cat PDFA_def.ps %! % This is a sampl

我正在centos上转换我的“pdf.pdf”文件:

gs-sDEVICE=pdfwrite-dNOOUTERSAVE-dNOPAUSE-dBATCH-dPDFA=1-dusececolor-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
你能帮我吗?我只需要将pdf转换为pdfa,目前没有一些元数据

[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