Jump to content

PDF/X-3 using Ghostscript on Windows: Difference between revisions

From tango.info wiki
No edit summary
 
(30 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Windows==
==Word==
* Print shop wants the file to have larger dimensions than the product that will be delivered. They will cut the paper on each side after printing.
* Page layout -> Margins -> Paper : Width = 29,9 cm; Height = 21,2 cm (+1mm on each side compared with A4)
 
==Installation==
* C:\Program Files (x86)\gs\gs9.06\bin\gswin32c.exe
* C:\Program Files (x86)\gs\gs9.06\bin\gswin32c.exe
* C:\Program Files (x86)\gs\gs9.06\lib\PDFX_def.ps
* C:\Program Files (x86)\gs\gs9.06\lib\PDFX_def.ps
** copy to C:\all\projects\pdf-x-3\PDFX_def.ps
** OLD: /ICCProfile (ISO Coated sb.icc) def  % Customize or remove.
** OLD: /ICCProfile (ISO Coated sb.icc) def  % Customize or remove.
** NEW: /ICCProfile (C:/Windows/System32/spool/drivers/color/ISOcoated_v2_300_eci.icc) def  % Customize or remove.
** NEW: /ICCProfile (C:/Windows/System32/spool/drivers/color/ISOcoated_v2_300_eci.icc) def  % Customize or remove.


==Testing==
Try:
http://meiradarocha.jor.br/news/2012/08/25/como-criar-um-documento-pdfx-3-com-o-ghostscript/
gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sColorConversionStrategy=CMYK -sOutputFile=doc_CMYK.pdf -dProcessColorModel=/DeviceCMYK -dCompatibilityLevel=1.4 doc.pdf
===TEST-1===
<pre>
<pre>
C:\Program Files (x86)\gs\gs9.06>bin\gswin32c -q -dNOPAUSE -dBATCH -sDEVICE=pdfw
C:\Program Files (x86)\gs\gs9.06>bin\gswin32c -q -dNOPAUSE -dBATCH -sDEVICE=pdfw
Line 13: Line 25:
.
.
</pre>
</pre>
RESULT: CMYK conversion not possible. The output during the test was created in the users directory.
===TEST-2===
* create C:\all\projects\pdf-x-3\
* copy gs9.06 to C:\all\projects\pdf-x-3\gs9.06
* create C:\all\projects\pdf-x-3\gs9.06\test\
* create C:\all\projects\pdf-x-3\gs9.06\input.pdf
* change to: C:\all\projects\pdf-x-3\gs9.06>
====TEST-2.1====
<pre>
bin\gswin32c -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sColorConversionStrategy=CMYK -sOutputFile=test\2.1.pdf -dProcessColorModel=/DeviceCMYK -dCompatibilityLevel=1.4 test\input.pdf
</pre>
GPL Ghostscript 9.06: Unable to convert color space to CMYK, reverting strategy to LeaveColorUnchanged.
====TEST-2.2====
* modify: C:\all\projects\pdf-x-3\gs9.06\lib\PDFX_def.ps
/ICCProfile (ISO Coated sb.icc) def  % Customize or remove.
%/ICCProfile (ISOcoated_v2_300_eci.icc) def  % Customize or remove.
* ADD: -f C:\all\projects\pdf-x-3\gs9.06\lib\PDFX_def.ps  (format taken from http://meiradarocha.jor.br/news/2012/08/26/como-gerar-com-qualquer-programa-pdfx-3-para-impressao/ Parametros )
<pre>
bin\gswin32c -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sColorConversionStrategy=CMYK -sOutputFile=test\2.2.pdf -dProcessColorModel=/DeviceCMYK -dCompatibilityLevel=1.4 -f C:\all\projects\pdf-x-3\gs9.06\lib\PDFX_def.ps test\input.pdf
</pre>
RESULT:
Error: /undefinedfilename in --file--
Operand stack:
  --nostringval--  --nostringval--  (ISO Coated sb.icc)  (r)
====TEST-2.3====
* copy ICC file to C:\all\projects\pdf-x-3\gs9.06\lib\ISOcoated_v2_300_eci.icc
* modify: C:\all\projects\pdf-x-3\gs9.06\lib\PDFX_def.ps
%/ICCProfile (ISO Coated sb.icc) def  % Customize or remove.
/ICCProfile (ISOcoated_v2_300_eci.icc) def  % Customize or remove.
<pre>
bin\gswin32c -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sColorConversionStrategy=CMYK -sOutputFile=test\2.3.pdf -dProcessColorModel=/DeviceCMYK -dCompatibilityLevel=1.4 -f C:\all\projects\pdf-x-3\gs9.06\lib\PDFX_def.ps test\input.pdf
</pre>
RESULT:
Error: /undefinedfilename in --file--
Operand stack:
  --nostringval--  --nostringval--  (ISOcoated_v2_300_eci.icc)  (r)
====TEST-2.4====
* use full path, modify: C:\all\projects\pdf-x-3\gs9.06\lib\PDFX_def.ps
%/ICCProfile (ISO Coated sb.icc) def  % Customize or remove.
/ICCProfile (C:\all\projects\pdf-x-3\gs9.06\lib\ISOcoated_v2_300_eci.icc) def  % Customize or remove.
<pre>
bin\gswin32c -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sColorConversionStrategy=CMYK -sOutputFile=test\2.4.pdf -dProcessColorModel=/DeviceCMYK -dCompatibilityLevel=1.4 -f C:\all\projects\pdf-x-3\gs9.06\lib\PDFX_def.ps test\input.pdf
</pre>
RESULT
Error: /undefinedfilename in --file--
Operand stack:
  --nostringval--  --nostringval--  (C:allprojectspdf-x-3gs9.06libISOcoated_v2_300_eci.icc)  (r)
====TEST-2.5====
* use forward slashes, modify: C:\all\projects\pdf-x-3\gs9.06\lib\PDFX_def.ps
/ICCProfile (C:/all/projects/pdf-x-3/gs9.06/lib/ISOcoated_v2_300_eci.icc) def  % Customize or remove.
<pre>
bin\gswin32c -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sColorConversionStrategy=CMYK -sOutputFile=test\2.5.pdf -dProcessColorModel=/DeviceCMYK -dCompatibilityLevel=1.4 -f C:\all\projects\pdf-x-3\gs9.06\lib\PDFX_def.ps test\input.pdf
</pre>
RESULT:  Unable to convert color space to CMYK, reverting strategy to LeaveColorUnchanged.
====TEST-2.6====
* -dCompatibilityLevel=1.3 (was 1.4)
* input now from office2010, not PDF/A, but printing
* page layout "margins" paper size
<pre>
bin\gswin32c -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sColorConversionStrategy=CMYK -sOutputFile=test\2.5.pdf -dProcessColorModel=/DeviceCMYK -dCompatibilityLevel=1.3 -f C:\all\projects\pdf-x-3\gs9.06\lib\PDFX_def.ps test\input.pdf
</pre>
RESULT:  Unable to convert color space to CMYK, reverting strategy to LeaveColorUnchanged.

Latest revision as of 2012-12-11T18:01:55

Word

  • Print shop wants the file to have larger dimensions than the product that will be delivered. They will cut the paper on each side after printing.
  • Page layout -> Margins -> Paper : Width = 29,9 cm; Height = 21,2 cm (+1mm on each side compared with A4)

Installation

  • C:\Program Files (x86)\gs\gs9.06\bin\gswin32c.exe
  • C:\Program Files (x86)\gs\gs9.06\lib\PDFX_def.ps
    • copy to C:\all\projects\pdf-x-3\PDFX_def.ps
    • OLD: /ICCProfile (ISO Coated sb.icc) def  % Customize or remove.
    • NEW: /ICCProfile (C:/Windows/System32/spool/drivers/color/ISOcoated_v2_300_eci.icc) def  % Customize or remove.

Testing

Try: http://meiradarocha.jor.br/news/2012/08/25/como-criar-um-documento-pdfx-3-com-o-ghostscript/

gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sColorConversionStrategy=CMYK -sOutputFile=doc_CMYK.pdf -dProcessColorModel=/DeviceCMYK -dCompatibilityLevel=1.4 doc.pdf

TEST-1

C:\Program Files (x86)\gs\gs9.06>bin\gswin32c -q -dNOPAUSE -dBATCH -sDEVICE=pdfw
rite -sColorConversionStrategy=CMYK -sOutputFile=doc_CMYK.pdf -dProcessColorMode
l=/DeviceCMYK -dCompatibilityLevel=1.4 ti.pdf
GPL Ghostscript 9.06:
Unable to convert color space to CMYK, reverting strategy to LeaveColorUnchanged
.

RESULT: CMYK conversion not possible. The output during the test was created in the users directory.

TEST-2

  • create C:\all\projects\pdf-x-3\
  • copy gs9.06 to C:\all\projects\pdf-x-3\gs9.06
  • create C:\all\projects\pdf-x-3\gs9.06\test\
  • create C:\all\projects\pdf-x-3\gs9.06\input.pdf
  • change to: C:\all\projects\pdf-x-3\gs9.06>

TEST-2.1

bin\gswin32c -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sColorConversionStrategy=CMYK -sOutputFile=test\2.1.pdf -dProcessColorModel=/DeviceCMYK -dCompatibilityLevel=1.4 test\input.pdf

GPL Ghostscript 9.06: Unable to convert color space to CMYK, reverting strategy to LeaveColorUnchanged.

TEST-2.2

  • modify: C:\all\projects\pdf-x-3\gs9.06\lib\PDFX_def.ps
/ICCProfile (ISO Coated sb.icc) def  % Customize or remove.
%/ICCProfile (ISOcoated_v2_300_eci.icc) def  % Customize or remove.
bin\gswin32c -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sColorConversionStrategy=CMYK -sOutputFile=test\2.2.pdf -dProcessColorModel=/DeviceCMYK -dCompatibilityLevel=1.4 -f C:\all\projects\pdf-x-3\gs9.06\lib\PDFX_def.ps test\input.pdf

RESULT:

Error: /undefinedfilename in --file--
Operand stack:
  --nostringval--   --nostringval--   (ISO Coated sb.icc)   (r)

TEST-2.3

  • copy ICC file to C:\all\projects\pdf-x-3\gs9.06\lib\ISOcoated_v2_300_eci.icc
  • modify: C:\all\projects\pdf-x-3\gs9.06\lib\PDFX_def.ps
%/ICCProfile (ISO Coated sb.icc) def  % Customize or remove.
/ICCProfile (ISOcoated_v2_300_eci.icc) def  % Customize or remove.
bin\gswin32c -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sColorConversionStrategy=CMYK -sOutputFile=test\2.3.pdf -dProcessColorModel=/DeviceCMYK -dCompatibilityLevel=1.4 -f C:\all\projects\pdf-x-3\gs9.06\lib\PDFX_def.ps test\input.pdf

RESULT:

Error: /undefinedfilename in --file--
Operand stack:
  --nostringval--   --nostringval--   (ISOcoated_v2_300_eci.icc)   (r)

TEST-2.4

  • use full path, modify: C:\all\projects\pdf-x-3\gs9.06\lib\PDFX_def.ps
%/ICCProfile (ISO Coated sb.icc) def  % Customize or remove.
/ICCProfile (C:\all\projects\pdf-x-3\gs9.06\lib\ISOcoated_v2_300_eci.icc) def  % Customize or remove.
bin\gswin32c -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sColorConversionStrategy=CMYK -sOutputFile=test\2.4.pdf -dProcessColorModel=/DeviceCMYK -dCompatibilityLevel=1.4 -f C:\all\projects\pdf-x-3\gs9.06\lib\PDFX_def.ps test\input.pdf

RESULT

Error: /undefinedfilename in --file--
Operand stack:
  --nostringval--   --nostringval--   (C:allprojectspdf-x-3gs9.06libISOcoated_v2_300_eci.icc)   (r)

TEST-2.5

  • use forward slashes, modify: C:\all\projects\pdf-x-3\gs9.06\lib\PDFX_def.ps
/ICCProfile (C:/all/projects/pdf-x-3/gs9.06/lib/ISOcoated_v2_300_eci.icc) def  % Customize or remove.
bin\gswin32c -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sColorConversionStrategy=CMYK -sOutputFile=test\2.5.pdf -dProcessColorModel=/DeviceCMYK -dCompatibilityLevel=1.4 -f C:\all\projects\pdf-x-3\gs9.06\lib\PDFX_def.ps test\input.pdf

RESULT: Unable to convert color space to CMYK, reverting strategy to LeaveColorUnchanged.

TEST-2.6

  • -dCompatibilityLevel=1.3 (was 1.4)
  • input now from office2010, not PDF/A, but printing
  • page layout "margins" paper size
bin\gswin32c -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sColorConversionStrategy=CMYK -sOutputFile=test\2.5.pdf -dProcessColorModel=/DeviceCMYK -dCompatibilityLevel=1.3 -f C:\all\projects\pdf-x-3\gs9.06\lib\PDFX_def.ps test\input.pdf

RESULT: Unable to convert color space to CMYK, reverting strategy to LeaveColorUnchanged.