Ken Sharp | 1 Jul 10:16 2010

Re: Problem using gs to build a PDF/A (Error: /undefinedfilename in --file-- )

At 17:42 30/06/2010 +0200, Vianney Lejeune wrote:

>There isn't any problem to build the file, but I want to build independent 
>color PDF/A files (-dUseCIEColor), so I guess I don't need the 
>-sProcessorColorModel switch, but I encounter this issue:
>
>--------------------
>$gs -q -dPDFA -dBATCH -dNOPAUSE -dNOOUTERSAVE -dUseCIEColor 
>-sDEVICE=pdfwrite -sPDFACompatibilityPolicy=1 -sOutputFile=out-a.pdf 
>PDFA_def.ps file.pdf
>Unrecoverable error: rangecheck in .putdeviceprops
>--------------------
>
>Is -sProcessorColorModel switch mandatory ?

Yes, for PDF/A and PDF/X output.

>If yes, why should I use it to build an independent color PDF/A files ?

pdfwrite doesn't know what colour space the colours are defined in, in the 
input file. Although you have specified -dUseCIEColor so that colours are 
transformed into CIEBased colour spaces pdfwrite has no way to know this. 
Also if the input was a PostScript file this switch could be turned off 
again, meaning that colours might then be encountered in a device-dependent 
space.

PDF/A specifies permissible device-dependent colour spaces, and you may 
only use one of them in a given file. pdfwrite requires that you specify 
which colour space you will use, so that if it should encounter a colour in 
a device-dependent colour space it will know what to do with it.
(Continue reading)

Jeremy Montoya | 27 Jul 21:57 2010

New TTF font issue with GhostPCL (GhostPDL-1.54)

Hello,

I'm having quite a bit of trouble understanding exactly the steps that need to be taken to add a new TTF font to the existing 80 fonts that currently exist with GhostPCL. This in fact is a barcode font (I may need to find other ones...but i'm just testing with Barcode 128). It is a TTF font and I have gone through two different paths as far as how to do this. One method involves modifying pfltable.c, adding the font information, and recompiling and linking it (while obviously moving the TTF font to the fonts directory. Currently I see the fonts reside in urwfonts-1.41 directory which is in the GhostPCL directory). By the way, I am running a Linux (Debian - parisc64) box. The other method I've seen is the modification of the Fontmap.GS to include the new font. I have not found any good documentation explaining exactly how to correctly insert the new font (do I need aliases? etc...). My overall goal for this is to add a barcode to a PDF I am creating using the pdfwrite option with PCL6. I may need other barcodes but I am trying to get this to work correctly with my current barcode first. The PCL file I am using is correct because I can get the barcode to correctly show up when sending directly to the printer instead of PDF. Can anyone help me or give me an understandable method of adding new fonts to the existing 80 for GhostPCL?

Thanks

Jeremy Montoya
_______________________________________________
gs-devel mailing list
gs-devel <at> ghostscript.com
http://ghostscript.com/cgi-bin/mailman/listinfo/gs-devel
gs-devel | 28 Jul 20:44 2010

Error only in x64 version

I have a .NET application that calls the GSAPI DLL to have gs perform various tasks. It has worked very
reliably for years.

I am trying to port the code to work under x64 using the 64-bit version of the DLL. When I do so I am able to load
the DLL but when I run a job I get a "typecheck in .putdeviceprops" error as follows. Since the postscript
(PDF) code passed to gs is identical, I have to wonder if there is a bug in the lib files:

The error returned is:

% Init started, instance 0x000000002A68FA30, with args: -dQUIET -dDEBUG -A -E -ZegIh_!"/#: -dBATCH
-dNOPAUSE -IGhostscript\x64;Ghostscript\x64\bin;Ghostscript\x64\lib; -sDEVICE=display
-dDisplayHandle=10#752520848 -g1205x275 -dPDFFitPage -dEPSFitPage -dTextAlphaBits=4
-dGraphicsAlphaBits=4 -dDisplayFormat=3213316 -sOutputFile=- 
zcontext.c(1179): [']create 12 at 0x1dad7640

The debugging info is:

START 0 1554904 256749 1301968 18892 true 542 3 <0>
END PROCS 2 1575088 284169 1301968 21372 true 664 3 <0>
gs_std_e.ps 3 1603688 306093 1322152 27268 true 672 3 <0>
gs_il1_e.ps 3 1623872 314700 1322152 27268 true 673 3 <0>
END FONTDIR/ENCS 4 1623872 314928 1322152 27268 true 675 3 <0>
END DEVS 4 1628872 327464 1322152 27268 true 679 3 <0>
END STATD 6 1628872 334541 1322152 30148 true 684 3 <0>
END GS_FONTS 8 1687592 394878 1322152 30148 true 732 3 <0>
END BASIC COLOR 9 1687592 401493 1322152 30148 true 752 3 <0>
END IMAGE 9 1707776 415981 1322152 30148 true 757 3 <0>
gs_btokn.ps 10 1707776 422338 1322152 30148 true 761 3 <0>
gs_dps1.ps 10 1748144 432903 1322152 30148 true 763 3 <0>
gs_dps2.ps 11 1748144 437621 1322152 30148 true 764 3 <0>
gs_type1.ps 11 1748144 441797 1322152 30148 true 772 3 <0>
gs_lev2.ps 12 1768328 465107 1418760 127476 true 778 3 <0>
BEGIN RESOURCES 12 1785192 482435 1418760 127476 true 778 4 <1>
END CATEGORY 13 1785192 485054 1418760 127764 true 779 5 <1>
END GENERIC 13 1815312 506416 1418760 127764 true 781 4 <1>
END FIXED 13 1815312 516417 1418760 127764 true 781 4 <1>
END MISC 13 1835496 527687 1418760 127764 true 781 4 <1>
END ENCODING 14 1835496 530917 1418760 127764 true 781 4 <1>
gs_resmp.ps 14 1855680 551284 1418760 127764 true 785 3 <1>
gs_res.ps 14 1838816 534391 1418760 127764 true 785 3 <0>
gs_typ42.ps 15 1838816 535472 1418760 127764 true 788 3 <0>
gs_cidfn.ps 16 1867416 569643 1418760 127764 true 796 3 <0>
gs_cidcm.ps 16 1897536 594325 1418760 127764 true 796 3 <0>
gs_fntem.ps 18 1946320 645890 1418760 127972 true 798 3 <0>
gs_cidtt.ps 19 1966504 662281 1418760 127972 true 798 3 <0>
gs_cidfm.ps 19 1986688 669110 1418760 127972 true 798 3 <0>
gs_cmap.ps 20 1986688 679283 1418760 127972 true 803 3 <0>
gs_setpd.ps 21 2006872 697328 1418760 127972 true 803 3 <0>
gs_typ32.ps 21 2006872 699326 1418760 127972 true 801 3 <0>
gs_frsd.ps 21 2006872 700917 1418760 127972 true 801 3 <0>
gs_ll3.ps 22 2027056 728130 1418760 127972 true 802 3 <0>
gs_mex_e.ps 23 2027056 730789 1418760 127972 true 802 3 <0>
gs_mro_e.ps 23 2027056 731853 1418760 127972 true 802 3 <0>
gs_pdf_e.ps 23 2027056 732921 1418760 127972 true 802 3 <0>
gs_wan_e.ps 23 2067424 740862 1418760 127972 true 802 3 <0>
pdf_ops.ps 24 2096024 776589 1418760 127972 true 802 3 <0>
gs_l2img.ps 24 2096024 779540 1418760 127972 true 805 3 <0>
pdf_rbld.ps 25 2096024 784338 1418760 127972 true 817 3 <0>
pdf_base.ps 26 2116208 811141 1418760 127972 true 1015 4 <0>
pdf_draw.ps 28 2176760 869687 1418760 127972 true 1015 4 <0>
pdf_font.ps 29 2225544 921756 1418760 128692 true 1016 4 <0>
pdf_main.ps 30 2294544 978242 1418760 128692 true 1023 4 <0>
pdf_sec.ps 31 2314728 989388 1418760 128692 true 1023 4 <0>
gs_css_e.ps 31 2314728 990692 1418760 128692 true 1023 4 <0>
gs_cff.ps 32 2334912 1016701 1418760 128692 true 1025 4 <0>
gs_mgl_e.ps 32 2334912 1017882 1418760 128692 true 1025 4 <0>
gs_agl.ps 33 2429560 1105151 1418760 128692 true 1026 4 <0>
Extend MacRomanEncodingForTrueType for TrueType: insert /summation  <at>  183
Extend MacRomanEncodingForTrueType for TrueType: insert /approxequal  <at>  197
Extend MacRomanEncodingForTrueType for TrueType: insert /radical  <at>  195
Extend MacRomanEncodingForTrueType for TrueType: insert /lozenge  <at>  215
Extend MacRomanEncodingForTrueType for TrueType: insert /Omega  <at>  189
Extend MacRomanEncodingForTrueType for TrueType: insert /pi  <at>  185
Extend MacRomanEncodingForTrueType for TrueType: insert /partialdiff  <at>  182
Extend MacRomanEncodingForTrueType for TrueType: insert /greaterequal  <at>  179
Extend MacRomanEncodingForTrueType for TrueType: insert /lessequal  <at>  178
Extend MacRomanEncodingForTrueType for TrueType: insert /Delta  <at>  198
Extend MacRomanEncodingForTrueType for TrueType: insert /product  <at>  184
Extend MacRomanEncodingForTrueType for TrueType: insert /infinity  <at>  176
Extend MacRomanEncodingForTrueType for TrueType: insert /integral  <at>  186
Extend MacRomanEncodingForTrueType for TrueType: cannot insert /Euro  <at>  219 used for /currency
Extend MacRomanEncodingForTrueType for TrueType: insert /notequal  <at>  173
Extend MacRomanEncodingForTrueType for TrueType: insert /apple  <at>  240
gs_ttf.ps 35 2613856 1295040 1418760 128692 true 1061 4 <0>
gs_icc.ps 36 2634040 1301156 1418760 128692 true 1062 4 <0>
gs_dps.ps 36 2634040 1304262 1418760 129186 true 1075 4 <0>
gs_dpnxt.ps 36 2654224 1309201 1418760 129186 true 1092 4 <0>
gs_epsf.ps 37 2654224 1315401 1418760 129186 true 1104 4 <0>
gs_fapi.ps 37 2654224 1318479 1418760 129186 true 1104 4 <0>
gs_pdfwr.ps 38 2694592 1355649 1418760 132816 true 1136 4 <0>
END INITFILES 38 2714776 1365700 1418760 132816 true 1164 4 <0>
./Fontmap 38 2714776 1368993 1418760 134654 true 1165 4 <1>
Ghostscript\x64/Fontmap 39 2714776 1369016 1418760 134654 true 1165 4 <1>
Ghostscript\x64\bin/Fontmap 39 2714776 1369043 1418760 134654 true 1165 4 <1>
Ghostscript\x64\lib/Fontmap 39 2714776 1369070 1418760 134654 true 1165 4 <1>
%rom%Resource/Init/Fontmap 39 2714776 1369096 1418760 134654 true 1165 4 <1>
%rom%lib/Fontmap 40 2775328 1414135 1418760 134654 true 1165 4 <1>
c:/gs/gs8.71/Resource/Init/Fontmap 40 2775328 1414169 1418760 134654 true 1165 4 <1>
c:/gs/gs8.71/lib/Fontmap 41 2775328 1414193 1418760 134654 true 1165 4 <1>
c:/gs/gs8.71/Resource/Font/Fontmap 41 2775328 1414227 1418760 134654 true 1165 4 <1>
c:/gs/fonts/Fontmap 41 2775328 1414246 1418760 134654 true 1165 4 <1>
END FONTS 41 2775328 1414319 1418760 134654 true 1165 4 <0>
Unrecoverable error: typecheck in .putdeviceprops
runEPS: Not DSC
<<
/Size 9 /Root 7 0 R
/Info 8 0 R
/ID [
( \243\001\346\013\322\214\273T\224c\242\233\343>\332)
(f\354F\265\304Q\025X\256bl\034\031b\276\242) ]
>>
%Resolving: [7 0]
<<
/Type /Catalog /Pages 5 0 R
/OutputIntents [
<<
/Type /OutputIntent /OutputCondition (SWOP CGATS TR 001-1995) /OutputConditionIdentifier (CGATS TR
001) /RegistryName (http://www.color.org) /Info () /S /GTS_PDFX >>
]
>>
endobj

The job I sent to the interpreter is (more or less):

{%PDF-1.3
%����
1 0 obj
[/CalRGB<</Gamma[2.2 2.2 2.2]/Matrix[0.4124 0.2126 0.0193 0.3576 0.7152 0.1192 0.1805 0.0722
0.9505]/WhitePoint[0.9505 1 1.09]>>]
endobj
4 0 obj
<</Length 48>>stream
q
BT
36 9.35 Td
ET
Q
q 1 0 0 1 0 0 cm /Xf1 Do Q

endstream
endobj
6 0 obj
<</Type/Page/MediaBox[0 0 198.43 45.35]/Resources<</ProcSet [/PDF /Text /ImageB /ImageC
/ImageI]/XObject<</Xf1 2 0 R>>/ColorSpace<</DefaultRGB 1 0 R>>>>/TrimBox[0 0 198.43
45.35]/Contents 4 0 R/Parent 5 0 R>>
endobj
2 0 obj
<</Type/XObject/Subtype/Form/Resources<</ProcSet [/PDF /Text /ImageB /ImageC
/ImageI]/XObject<</Xf2 3 0 R>>/ColorSpace<</DefaultRGB 1 0 R>>>>/BBox[0 0 198.43 45.35]/FormType
1/Matrix [1 0 0 1 0 0]/Length 27>>stream
q 1 0 0 1 0 0 cm /Xf2 Do Q

endstream
endobj
3 0 obj
<</Type/XObject/Subtype/Form/Resources<</ProcSet [/PDF /Text /ImageB /ImageC
/ImageI]/ColorSpace<</DefaultRGB 1 0 R>>>>/BBox[0 0 198.43 45.35]/FormType 1/Matrix [1 0 0 1 0
0]/Length 185>>stream
q
7 0 m
191.43 0 l
195.29 0 198.43 3.13 198.43 7 c
198.43 38.35 l
198.43 42.22 195.29 45.35 191.43 45.35 c
7 45.35 l
3.13 45.35 0 42.22 0 38.35 c
0 7 l
0 3.13 3.13 0 7 0 c
0 0 0 rg
f
Q

endstream
endobj
5 0 obj
<</Type/Pages/Count 1/Kids[6 0 R]/ITXT(5.0.2)>>
endobj
7 0 obj
<</Type/Catalog/Pages 5 0 R/OutputIntents[<</Type/OutputIntent/OutputCondition(SWOP CGATS TR
001-1995)/OutputConditionIdentifier(CGATS TR 001)/RegistryName(http://www.color.org)/Info()/S/GTS_PDFX>>]>>
endobj
8 0 obj
<</Producer(iTextSharp 5.0.2 \(c\) 1T3XT
BVBA)/CreationDate(D:20100728115137-04'00')/ModDate(D:20100728115137-04'00')/GTS_PDFXVersion(PDF/X-3:2002)/Title(Pdf document)/Creator(Unknown)/Trapped/False>>
endobj
xref
0 9
0000000000 65535 f 
0000000015 00000 n 
0000000479 00000 n 
0000000747 00000 n 
0000000160 00000 n 
0000001152 00000 n 
0000000255 00000 n 
0000001215 00000 n 
0000001431 00000 n 
trailer
<</Size 9/Root 7 0 R/Info 8 0 R/ID [<48e93075f1498d77e1ad12d0b69d3945><b5ddd58eb5a87d8aa46aaeff51482097>]>>
startxref
1647
%%EOF
}

Please help if you can!

------------------------------
Yvan Rodrigues
Systems & Innovation
Mabel’s Labels Inc.
www.mabel.ca

_______________________________________________
gs-devel mailing list
gs-devel <at> ghostscript.com
http://ghostscript.com/cgi-bin/mailman/listinfo/gs-devel
mingqiang yu | 30 Jul 16:31 2010
Picon

Can't find CID font "TimesNewRoman"

I'm getting the following error for one of my pdf files when I use 'gs
myfile.pdf':

Can't find CID font "TimesNewRoman".
Substituting CID font /Adobe-Identity for /TimesNewRoman, see
doc/Use.htm#CIDFontSubstitution.
The substitute CID font "Adobe-Identity" is not provided either. Will
exit with error.
Error: /undefined in findresource
Operand stack:
   --dict:8/17(L)--   C2_4   1   --dict:5/5(L)--   --dict:5/5(L)--
TimesNewRoman,Bold   --dict:10/12(ro)(G)--   --nostringval--
CIDFontObject   --dict:7/7(L)--   --dict:7/7(L)--   Adobe-Identity
.....

The following is a line in the output of 'gs -c 'loadallfonts quit' command:
Loading TimesNewRomanPSMT font from
/usr/X11R6/lib/X11/fonts/truetype/times.ttf... 4928912 3559524 7226064
5837907 1 done.

When I execute /TimesNewRoman findfont, I get:

Scanning /usr/X11R6/lib/X11/fonts/truetype for fonts... 33 files, 32
scanned, 31 new fonts.
Loading TimesNewRomanPSMT font from
/usr/X11R6/lib/X11/fonts/truetype/times.ttf... 2551552 1226203 3180540
1872031 1 done.

It says on the user manual
http://pages.cs.wisc.edu/~ghost/doc/cvs/Use.htm#CIDFonts:
CID font resources must first be combined with a CMap resource, which
defines specific codes for glyphs, before it can be used as a font.
This allows the reuse of a collection of glyphs with different
encodings.
The simplest method to request a font composed of a CID font resource
and a CMap resource in a PostScript document is
    /CIDFont-CMap findfont
where CIDFont is a name of any CID font resource, and CMap is a name
of a CMap resource designed for the same character collection. The
interpreter will compose the font automatically from the specified CID
font and CMap resources. Another method is possible using the
composefont operator.
CID fonts must be placed in the /Resource/CIDFont/ directory. They are
not found using Font lookup on the search path or font path.

But I don't even have a CIDFont directory inside my Resource
directory. I don't know how I can make the CID font TimesNewRoman work
with the pdf file. When I look at the properties of my pdf file, it
shows:
Arial, Bold
    Type: TrueType(CID)
     Encoding: Identity-H
     Actual Font: Arial, Bold
     Actual Font Type: TrueType

TimesNewRoman (Embedded Subset)
    Type: TrueType(CID)
    Encoding: Identity-H

TimesNewRoman, Bold
    Type: TrueType(CID)
    Encoding: Identity-H
    Actual Font: TimesNewRoman, Bold
    Actual Font Type: TrueType

Thanks a lot for your help.

Ming
John Culleton | 30 Jul 22:12 2010

Create PDF X/1-a file using ghostscript.

Is there a way to create a pdf file from e.g. a .ps file that both meets
the PDF X/1-a standard and says so inside the document? 
--

-- 
John Culleton
Wexford Press
"Create Book Covers with Scribus"
Printable E-book 38 pages $5.95
http://www.booklocker.com/books/4055.html
Ken Sharp | 31 Jul 10:36 2010

Re: Create PDF X/1-a file using ghostscript.

At 16:12 30/07/2010 -0400, John Culleton wrote:

>Is there a way to create a pdf file from e.g. a .ps file that both meets
>the PDF X/1-a standard and says so inside the document?

We don't especially support the production of PDF/X1 (or PDF/X2) files, so 
there is no quick way to do this.

However you could probably do it yourself; start by setting the PDFX switch 
and then customise the 'defs' file. Normally for a PDF/X-3 file you would 
use the file PDFX_def.ps, if you changed the line:

[ /GTS_PDFXVersion (PDF/X-3:2002) % Must be so (the standard requires).

To:

[ /GTS_PDFXVersion (PDF/X-1:2001) % Must be so (the standard requires).

The file will be identified as a PDF/X1 file. You might also have to add a 
line like:

/GTS_PDFXConformance (PDF/X-1a:2001)

to make it specifically X1-a conformant.

Other than that its just a matter of setting the various pdfwrite controls 
so that the PDF file is produced in a manner conforming to the PDF/X1-a 
specification. I don't happen to have a copy of the spec, but the from the 
application note it looks like it should be possible.

             Ken
Siow Tan | 31 Jul 18:00 2010
Picon

how to contribute a device driver to gs

Greetings!

I'm new to this list so I apologise if this qn has been asked before. 

I have a gs raster driver that prints to a kodak inkjet all-in-one, which I'm thinking of contributing to gnu gs. I hope it can make it to a linux distro.  Not sure if you still accept user contrib. If yes, please show me how to do this.  If no, I will appreciate a reply.  Thx in advance.

stan

_______________________________________________
gs-devel mailing list
gs-devel <at> ghostscript.com
http://ghostscript.com/cgi-bin/mailman/listinfo/gs-devel

Gmane