Bug 690305

Summary: PDFA Creating With CIDToGIDMap missing
Product: Ghostscript Reporter: Wang Xusheng <wxs>
Component: PDF WriterAssignee: Ken Sharp <ken.sharp>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P4    
Version: 8.62   
Hardware: PC   
OS: Windows 2000   
Customer: Word Size: ---
Attachments: test ps file
test pdf file

Description Wang Xusheng 2009-02-25 01:12:56 UTC
I use gs8.62 to create  PDFA files with Chinese characters and truetype fonts, 
but the files are not compliant with PDF/A-1b. I use acrobat 8.0 as verifier 
for PDF/A-1b which says "Type 2 CID font: CIDToGIDMap invalid or missing".
Comment 1 Wang Xusheng 2009-02-25 01:18:32 UTC
The command line is:
gswin32c -sDEVICE=pdfwrite -sProcessColorModel=DeviceCMYK -dPDFA -
dCompatibilityLevel=1.4  -dBATCH -dNOPAUSE -dNOOUTERSAVE -dUseCIEColor -
sOutputFile="%2" PDFA_def.ps %1 
Comment 2 Ken Sharp 2009-02-25 01:25:41 UTC
Firstly 8.62 is now a year old, I'd recommend you get 8.64 and try that, there
have been some changes for PDF/A support.

Secondly while the command line is useful, a sample file is essential for us to
reproduce the problem. Please attach an example file exhibiting the problem.

Comment 3 Wang Xusheng 2009-02-25 01:37:47 UTC
Created attachment 4812 [details]
test ps file
Comment 4 Wang Xusheng 2009-02-25 01:39:18 UTC
Created attachment 4813 [details]
test pdf file
Comment 5 Wang Xusheng 2009-02-25 01:47:14 UTC
I tried 8.64 release, but the same command can't be executed, the error message 
is:
While reading gs_res.ps:
Error: /rangecheck in --getinterval--
Operand stack:
   (gs_res.ps)   (C:\\PDFAMaker\\gs8.64\\Resource)   ()   0   1
Execution stack:
   %interp_exit   --nostringval--   --nostringval--   --nostringval--   %array_c
ontinue   --nostringval--   --nostringval--   --nostringval--   false   1   %sto
pped_push   --nostringval--   --nostringval--   --nostringval--   %array_continu
e   --nostringval--
Dictionary stack:
   --dict:776/1123(G)--   --dict:62/200(L)--   --dict:776/1123(G)--   --dict:165
/251(G)--   --dict:776/1123(G)--   --dict:23/40(ro)(G)--
Current file position is 11413
Unrecoverable error: undefined in .uninstallpagedevice
Operand stack:
    gs_res.ps  C:\PDFAMaker\gs8.64\Resource    0  1

In addtion, I found the directory structure for 8.64 are quite different with 
8.62. It has no fonts directory, Resource directory is not present under 
gs8.64. I copied the resource directory from source, but has no effect.

the command line is:
C:\PDFAMaker\gs8.64\bin\gswin32c -IC:\PDFAMaker\gs8.64\lib;C:\PDFAM
aker\gs8.64\Resource;C:\PDFAMaker\gs8.64\Resource\Init;C:\PDFAMaker\fonts;D:\WIN
DOWS\fonts -sDEVICE=pdfwrite -sProcessColorModel=DeviceCMYK -sColorSpace=Default
RGB -dPDFA -dCompatibilityLevel=1.4  -dBATCH -dNOPAUSE -dNOOUTERSAVE -dUseCIECol
or -sOutputFile="c:/test.pdf" PDFA_def.ps c:/test.ps
Comment 6 Ken Sharp 2009-02-25 01:57:14 UTC
8.64 has the resources defined by default in a ROM file system, which is why
they seem to have 'disappeared'. 

Your application is invoking GS with specific locations using the -I switch:

-IC:\PDFAMaker\gs8.64\lib;C:\PDFAMaker\gs8.64\Resource;C:\PDFAMaker\gs8.64\Resource\Init;

You can still do this, but you need to ensure all the correct files are in the
correct locations. These files are still available in the source release,
because this is what's used to build the ROM file system for the binary. You
should either remove the -I switch, or provide teh complete set of resources
from the source release.

The file does run through my 8.64 installation, but does still fail the Acrobat
9 preflight check for PDF/A-1b. 
Comment 7 Ken Sharp 2009-04-09 06:58:36 UTC
Fixed in revision 9624, patch here:

http://ghostscript.com/pipermail/gs-cvs/2009-April/009211.html