[gs-bugs] [Bug 691448] New: [Documentation] Sample command for PDF/A generation does not work

bugzilla-daemon at ghostscript.com bugzilla-daemon at ghostscript.com
Fri Jul 9 17:44:19 UTC 2010


http://bugs.ghostscript.com/show_bug.cgi?id=691448

           Summary: [Documentation] Sample command for PDF/A generation
                    does not work
           Product: Ghostscript
           Version: 8.71
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P4
         Component: Documentation
        AssignedTo: support at artifex.com
        ReportedBy: pipitas at googlemail.com
         QAContact: gs-bugs at ghostscript.com
   Estimated Hours: 0.0


The documentation, file Ps2pdf.htm, gives "a sample command line to invoke
Ghostscript for generating a PDF/A document" like this:

gswin32c.exe ^
    -dPDFA ^
    -dBATCH ^
    -dNOPAUSE ^
    -dNOOUTERSAVE ^
    -dUseCIEColor^
    -sDEVICE=pdfwrite ^
    -sOutputFile=tiger.pdf ^
    PDFA_def.ps ^
    c:\gs\examples\tiger.eps

This command does not work for me. I get this error message:

--------------------------------------------------------------------
GPL Ghostscript 8.71 (2010-02-10)
Copyright (C) 2010 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
ERROR: ProcessColorModel must be /DeviceGray or DeviceCMYK.
Error: /rangecheck in ProcessColorModel
Operand stack:

Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval-- 
--nostringval--
   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--  
   false 1   %stopped_push   1878   1   3   %oparray_pop   1877   1   3   
   %oparray_pop   1861   1   3   %oparray_pop   1755   1   3   %oparray_pop  
   --nostringval--   %errorexec_pop   .runexec2   --nostringval--  
   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:1159/1684(ro)(G)--   --dict:0/20(G)--   --dict:70/200(L)--
Current allocation mode is local
Current file position is 563
GPL Ghostscript 8.71: Unrecoverable error, exit code 1
--------------------------------------------------------------------

OK, I change the ProcessColorModel according to the hint in the message and try
this:

gswin32c.exe ^
    -dPDFA ^
    -dBATCH ^
    -dNOPAUSE ^
    -dNOOUTERSAVE ^
    -dProcessColorModel=/DeviceCMYK ^
    -sDEVICE=pdfwrite ^
    -sOutputFile=tiger.pdf ^
    c:\gs\examples\tiger.eps

But this also doesn't work. It gives this error:

--------------------------------------------------------------------
GPL Ghostscript 8.71 (2010-02-10)
Copyright (C) 2010 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   1878   1   3   %oparray_pop   1877   1   3   
   %oparray_pop   1861   1   3   %oparray_pop   1755   1   3   %oparray_pop   
   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   
   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:1159/1684(ro)(G)--   --dict:0/20(G)--   --dict:71/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
Current file position is 940
GPL Ghostscript 8.71: Unrecoverable error, exit code 1
--------------------------------------------------------------------

This time I do not see an obvious way to modify my command (I do not comprehend
the error message, but I assume it is in the Operant stack, not the other two
stacks....)

So my next attempt is this (skipping the "PDFA_def.ps" from the commandline):

gswin32c.exe ^
    -dPDFA ^
    -dBATCH ^
    -dNOPAUSE ^
    -dNOOUTERSAVE ^
    -dProcessColorModel=/DeviceCMYK ^
    -sDEVICE=pdfwrite ^
    -sOutputFile=tiger.pdf ^
    c:\gs\examples\tiger.eps

This one works. I want to see, if it makes a difference to give the absolute
path to the "PDFA_def.ps". Therefor I try this:

gswin32c.exe ^
    -dPDFA ^
    -dBATCH ^
    -dNOPAUSE ^
    -dNOOUTERSAVE ^
    -dProcessColorModel=/DeviceCMYK ^
    -sDEVICE=pdfwrite ^
    -sOutputFile=tiger.pdf ^
    c:\gs\lib\PDFA_def.ps ^
    c:\gs\examples\tiger.eps

Same problem as above ("Error: /undefinedfilename in --file--"). So maybe it
does not like the "/ICCProfile (ISO Coated sb.icc) def" part in PDFA_def.ps.

I replace it with "/ICCProfile (default_cmyk.icc) def", since such an .icc file
indeed is available in the "iccprofiles" subdirectory (I couldn't find one
called "ISO Coated sb.icc"). Still no success...

Only after putting an absolute, full path into the definition I really get an
PDF created: "/ICCProfile (C:\\gs\\iccprofiles\\default_cmyk.icc) def"

[I did not check if the result passes PDF/A verification by tools such as the
one from Callas Software. But I will check as soon as I have access to such a
tool.]

-- 
Configure bugmail: http://bugs.ghostscript.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the gs-bugs mailing list