CMYK and pdf

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
t-servi

CMYK and pdf

Post 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?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: CMYK and pdf

Post 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.
t-servi

Re: CMYK and pdf

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: CMYK and pdf

Post 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.
t-servi

Re: CMYK and pdf

Post 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.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: CMYK and pdf

Post 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.
t-servi

Re: CMYK and pdf

Post by t-servi »

Hello,
Where must I install the header files, in which directory?
Best regards.
Jean Tinguely Awais.
t-servi

Re: CMYK and pdf

Post 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.
t-servi

Re: CMYK and pdf

Post by t-servi »

Hello,
On which platform did you make the test? Debian 4, Mac, Suse?
Best Regards.
Jean Tinguely Awais.
t-servi

Re: CMYK and pdf

Post 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.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: CMYK and pdf

Post 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.
t-servi

Re: CMYK and pdf

Post 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.
Post Reply