【发布时间】:2015-07-09 08:08:58
【问题描述】:
我们需要将使用 ApacheFOP 创建并与pdftk 合并的 PDF 转换为 PDF/X-1a。我已经创建了一个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 :
[ /GTS_PDFXVersion (PDF/X-1:2001) % Must be so (the standard requires).
/GTS_PDFXConformance (PDF/X-1a:2001)
/Title (Title) % Customize.
/Trapped /False % Must be so (Ghostscript doesn't provide other).
/DOCINFO pdfmark
% Define an ICC profile :
/ICCProfile (/var/www/share/data/files/sRGB_IEC61966-2-1_black_scaled.icc) def % Customize or remove.
currentdict /ICCProfile known {
[/_objdef {icc_PDFX} /type /stream /OBJ pdfmark
[{icc_PDFX} <</N>> /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
然后我在下面的命令中使用这个文件:
gs -dPDFX -dBATCH -dNOPAUSE -dNOOUTERSAVE -dUseCIEColor \
-sProcessColorModel=DeviceCMYK -sDEVICE=pdfwrite \
-sOutputFile=output-x1a.pdf PDFX_def.ps output.pdf
我使用的是 Ghostscript 9.05,这里是原始文件和生成的 PDF 的链接:
正如您在 PDF 文件中看到的那样,图像周围的透明度丢失了。你知道如何解决吗?还是使用 Debian 从原始文件创建 PDF/X1a 文件的更好方法?
【问题讨论】:
-
一个更好的问题标题是“转换时图像的透明度丢失......”
标签: pdf pdf-generation ghostscript pdftk