Page 1 of 1

CMYK and pdf

Posted: 2008-03-24T06:55:20-07:00
by t-servi
Hello,
I want to generate a simple PDF in CMYK with ImageMagick 6.2.3 ( Linux ) with this command :

Code: Select all

convert -background lightblue -fill (0,0,0,100) -font Times-Roman -pointsize 80 label:Artification testConvert1.pdf
But it gives me this message :

Code: Select all

-bash: syntax error near unexpected token `('
How can I do?
Best Regards.

Edit:
I test this command too :

Code: Select all

convert -background lightblue -fill cmyk(0,0,0,100) -font Times-Roman -pointsize 80 label:Artification testConvert1.pdf
Doesn't work!

Edit 2:
This command :

Code: Select all

convert -background lightblue -fill "cmyk(0,0,0,100)" -font Times-Roman -pointsize 80 label:Artification testConvert1.pdf
gives me this message :

Code: Select all

convert: unrecognized color `cmyk(0,0,0,100)'.
What can I do?

Re: CMYK and pdf

Posted: 2008-03-24T07:12:56-07:00
by magick
> convert: unrecognized color `cmyk(0,0,0,100)'.

You may need to upgrade. We're using ImageMagick 6.4.0 and your command ran without complaint.

Re: CMYK and pdf

Posted: 2008-03-24T07:57:48-07:00
by t-servi
Hello Magick,
Thank you.
I install Image Magick 6.4.0 from sources in /usr/local/im640 and try again with this command :

Code: Select all

/usr/local/im640/bin/convert -background lightblue -fill 'cmyk(0,0,0,100)' -font Helvetica -pointsize 80 label:Artification testConvert1.pdf
but the command gives me this message :

Code: Select all

convert: delegate library support not built-in `/usr/local/im640/lib/ImageMagick-6.4.0/config//usr/share/ghostscript/fonts/n019003l.pfb' (Freetype).
convert: delegate library support not built-in `/usr/local/im640/lib/ImageMagick-6.4.0/config//usr/share/ghostscript/fonts/n019003l.pfb' (Freetype).
convert: delegate library support not built-in `/usr/local/im640/lib/ImageMagick-6.4.0/config//usr/share/ghostscript/fonts/n019003l.pfb' (Freetype).
May be I must install something more? Don't know what.
Best regards.
Jean Tinguely Awais

Re: CMYK and pdf

Posted: 2008-03-24T08:51:41-07:00
by magick
Looks like Freetype was not validated at build time. It is required to render text properly. Without it the text should be rendered but not as accurately. When you run the ImageMagick configure script look at the last 50 or so lines of output. Make sure it says that Freetype support is enabled. If not, see config.log for the reason it failed to validate. Fix the problem and rerun the ImageMagick configure script until Freetype validate. Now just build and install and your command should work.

Re: CMYK and pdf

Posted: 2008-03-24T09:24:46-07:00
by t-servi
Hello,
I've done this :

Code: Select all

>./configure --prefix=/usr/local/im640 --with-freetype=yes > output.txt
>cat output.txt | grep freetype
checking for freetype-config... no
checking for FT_Init_FreeType in -lfreetype... no
checking for freetype/freetype.h... no
FreeType          --with-freetype=yes    no
Don't understand why the configuration will not make whit-freetype=yes.
If I check my installation I see ( Ubuntu 5.10 ) :

Code: Select all

>dpkg -l | grep ii | grep freetype
ii  freetype1-tools                        1.4pre.20030402-1.1                Bundled tests, demos and tools for FreeType
ii  freetype2                              1.4pre.20030402-1.1                Dummy package for transition to libttf2
ii  libfreetype6                           2.1.7-2.4ubuntu1                   FreeType 2 font engine, shared library files
Thank you for your help.
Best regards.
Jean Tinguely Awais.

Re: CMYK and pdf

Posted: 2008-03-24T10:12:08-07:00
by magick
To understand why Freetype failed to validate, see config.log.

Most likely you need to install the Freetype developer package which includes the required Freetype header files.

Re: CMYK and pdf

Posted: 2008-03-25T00:48:58-07:00
by t-servi
Hello,
Where must I install the header files, in which directory?
Best regards.
Jean Tinguely Awais.

Re: CMYK and pdf

Posted: 2008-03-29T05:05:22-07:00
by t-servi
Hello,
@magick : Can you make a

Code: Select all

find / -name freetype.h
an indicat where the header file is installed, please.
Best regards.
Jean Tinguely Awais.

Re: CMYK and pdf

Posted: 2008-03-31T04:39:09-07:00
by t-servi
Hello,
On which platform did you make the test? Debian 4, Mac, Suse?
Best Regards.
Jean Tinguely Awais.

Re: CMYK and pdf

Posted: 2008-04-01T00:07:06-07:00
by t-servi
Hello,
I reinstall Image Magick 6.4. Now the message is :

Code: Select all

# convert -background lightblue -fill "cmyk(0,0,0,100)" -font Times-Roman -pointsize 80 label:Artification testConvert1.pdf
convert: unable to read font `Times-Roman'.
convert: delegate library support not built-in `Times-Roman' (Freetype).
convert: unable to read font `Times-Roman'.
convert: delegate library support not built-in `Times-Roman' (Freetype).
convert: unable to read font `Times-Roman'.
convert: delegate library support not built-in `Times-Roman' (Freetype).

The "convert -list font" send an empty string?! :?
I'm lost.
Thank you for your help.
Best Regards.
Jean Tinguely Awais.

Re: CMYK and pdf

Posted: 2008-04-01T06:33:01-07:00
by magick
You need to install the FreeType and FreeType development distributions on your system and rerun the ImageMagick configure script. Check the output of the script and make sure FreeType validated. Next rebuild and reinstall ImageMagick. You will now be able to render TrueType fonts.

Re: CMYK and pdf

Posted: 2008-04-01T07:52:03-07:00
by t-servi
Hello,
@Magick : Now I'm a crack of the installation of Image Magick 6.4.0.
Thank you for your help.
Best regards.
Jean Tinguely Awais.