[英]Can Ghostscript currently convert a PDF to PDF/X?
印刷廠要求我的論文的PDF與PDF / X1a:2001兼容。 內容文件是使用XeTeX LaTeX
編譯的,第二個PDF是使用Inkscape 0.48
完成的封面設計。
我在這篇帖子中找到的最接近的答案是: https : //stackoverflow.com/a/3483801/1288722 ,如果我正確理解的話,至少可以使用Ghostscript將PDF轉換為PDF / X。
如以上答案所述,轉換為PDF / X需要有效的ICC配置文件。 我聯系了印刷廠,他們提供了他們喜歡的文件: ISOcoated_v2_300_eci.icc
。 我將.icc
文件添加到了目標pdf文件的同一文件夾中(感謝VadimR的支持)。
Ghostscript的
我從命令行使用了此腳本,但是它不起作用:
gswin32c -dPDFX -dBATCH -dNOPAUSE -dNOOUTERSAVE -sProcessColorModel=DeviceCMYK -sDEVICE=pdfwrite -sOutputFile=outputfile.pdf PDFX_def.ps doctorate.pdf
我花了一些時間來做220頁,但是效果太差了,令人不快。
PDFX_def.ps
內容:
%!
% This is a sample prefix file for creating a PDF/X-3 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.
systemdict /ProcessColorModel known {
systemdict /ProcessColorModel get dup /DeviceGray ne exch /DeviceCMYK ne and
} {
true
} ifelse
{ (ERROR: ProcessColorModel must be /DeviceGray or DeviceCMYK.)=
/ProcessColorModel cvx /rangecheck signalerror
} if
% Define entries to the document Info dictionary :
/ICCProfile (ISOcoated_v2_300_eci.icc) def % Customize or remove.
%/ICCProfile (ISO Coated sb.icc) def % Customize or remove.
[ /GTS_PDFXVersion (PDF/X-3:2002) % Must be so (the standard requires).
/Title (Title) % Customize.
/Trapped /False % Must be so (Ghostscript doesn't provide other).
/DOCINFO pdfmark
% Define an ICC profile :
currentdict /ICCProfile known {
[/_objdef {icc_PDFX} /type /stream /OBJ pdfmark
[{icc_PDFX} <</N systemdict /ProcessColorModel get /DeviceGray eq {1} {4} ifelse >> /PUT pdfmark
[{icc_PDFX} ICCProfile (r) file /PUT pdfmark
} if
% Define the output intent dictionary :
[/_objdef {OutputIntent_PDFX} /type /dict /OBJ pdfmark
[{OutputIntent_PDFX} <<
/Type /OutputIntent % Must be so (the standard requires).
/S /GTS_PDFX % Must be so (the standard requires).
/OutputCondition (Commercial and specialty printing) % Customize
/Info (none) % Customize
/OutputConditionIdentifier (CGATS TR001) % Customize
/RegistryName (http://www.color.org) % Must be so (the standard requires).
currentdict /ICCProfile known {
/DestOutputProfile {icc_PDFX} % Must be so (see above).
} if
>> /PUT pdfmark
[{Catalog} <</OutputIntents [ {OutputIntent_PDFX} ]>> /PUT pdfmark
那我想念什么呢?
筆記
您可以生成PDF / X文件,但不能生成PDF / X1文件。我記得PDF / X-1要求所有顏色均以CMYK或Gray指定,而較早版本的pdfwrite無法做到,當前版本可以,但是需要一些顏色使其與PDF / X-1兼容的其他工作,我不確定它值得付出什么努力。
查看此錯誤報告
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.