[GhostScript] Utilisation sous Unix

Fermé
kij_82 Messages postés 4089 Date d'inscription jeudi 7 avril 2005 Statut Contributeur Dernière intervention 30 septembre 2013 - 1 mars 2007 à 17:35
kij_82 Messages postés 4089 Date d'inscription jeudi 7 avril 2005 Statut Contributeur Dernière intervention 30 septembre 2013 - 6 mars 2007 à 10:30
Bonjour,

Je ne suis pas du tout expert en ghostscript, et je dois l'utiliser pour faire du traitement sur des PDF (conversion en TIFF image).

Voici donc la commande que je lance :
gs -sDEVICE=tiffg4 -q -dNOPAUSE -dSAFER -r300 -dPDFFitPage -dUseCropBox -dNOINTERPOLATE -sOutputFile=CHEMIN/%08d.tif CHEMIN/CN________1231886.pdf -c quit 


La commande se lance bien (bonnes options, etc..), mais j'ai un probleme de reconnaissance des objets PDF de type 'JBIG2Decod'. Voici les erreurs dans la console :
   **** ERROR: Unable to process JBIG2Decode data. Page will be missing data.
   **** ERROR: Unable to process JBIG2Decode data. Page will be missing data.
   **** ERROR: Unable to process JBIG2Decode data. Page will be missing data.
   **** ERROR: Unable to process JBIG2Decode data. Page will be missing data.



J'ai effectué cette conversion sous windows en installant la version 8.15 de ghostscript, ainsi que la version 8.54 (derniere) et ca fonctionne à merveille, j'ai bien mes TIFF en sortie correctement converti.
Seulement sous Unix j'ai les erreurs mise plus haut avec la version 8.15 ou 8.54 (ou n'importe quelle autre).
Toujours sous Unix, j'ai essayé sous d'autre serveur à ma disposition, avec les mêmes versions ou d'autres, aucune erreur, seulement les tiff en sortie sont mauvais (donnée image à l'envers, se chevauchant, enfin bref pas bon)

Donc je voulais savoir si quelqun ne pouvait pas m'aider à faire fonctionner tout ceci sous une version (n'importe) de ghostscript sous Unix ? Savoir si je dois cherche du coté d'une librairie manquante, d'un bug connu sous Unix de ghostscript ?!

Je vous remercie de votre intérêt sur la question :)
A voir également:

4 réponses

kij_82 Messages postés 4089 Date d'inscription jeudi 7 avril 2005 Statut Contributeur Dernière intervention 30 septembre 2013 857
2 mars 2007 à 10:24
Je précise que je suis sous Unix AIX.


Depuis j'ai tenté de DL d'autre release de jbig2 de refaire l'install mais rien n'y change, je ne comprends pas. J'ai pourtant bien les librairies qu'il faut - a savoir jpeg, libpng, zlib et jbig2dec.

:s
0
kij_82 Messages postés 4089 Date d'inscription jeudi 7 avril 2005 Statut Contributeur Dernière intervention 30 septembre 2013 857
2 mars 2007 à 10:52


Je viens de voir que lors du configure, j'ai le warning suivant :
JBIG2 support requires sdtint types which do not seem to be available.


J'ai jeté un oeil dans le stdint_.h situé dans le rep src de ghostscript et j'ai les lignes suivantes :

/* Copyright (C) 2003 artofcode LLC.  All rights reserved.

  This software is provided AS-IS with no warranty, either express or
  implied.

  This software is distributed under license and may not be copied,
  modified or distributed except as expressly authorized under the terms
  of the license contained in the file LICENSE in this distribution.

  For more information about licensing, please refer to
  http://www.ghostscript.com/licensing/. For information on
  commercial licensing, go to https://artifex.com/licensing/ or
  contact Artifex Software, Inc., 101 Lucas Valley Road #110,
  San Rafael, CA  94903, U.S.A., +1(415)492-9861.
*/

/* $Id: stdint_.h,v 1.1.2.3 2004/03/24 23:49:54 giles Exp $ */
/* Generic substitute for stdint.h */

#ifndef stdint__INCLUDED
#  define stdint__INCLUDED

/*
 * ensure our standard defines have been included
 */
#include "std.h"

/* Define some stdint.h types. The jbig2dec headers and ttf bytecode
 * interpreter require these and they're generally useful to have around
 * now that there's a standard.
 */

/* Some systems are guaranteed to have stdint.h
 * but don't use the autoconf detection
 */
#ifndef HAVE_STDINT_H
# ifdef __MACOS__
#   define HAVE_STDINT_H
# endif
#endif

/* try a generic header first */
#if defined(HAVE_STDINT_H)
# include <stdint.h>
# define STDINT_TYPES_DEFINED
#elif defined(SYS_TYPES_HAS_STDINT_TYPES)
  /* std.h will have included sys/types.h */
# define STDINT_TYPES_DEFINED
#endif

/* try platform-specific defines */
#ifndef STDINT_TYPES_DEFINED
# if defined(__WIN32__) /* MSVC currently doesn't provide C99 headers */
   typedef signed char             int8_t;
   typedef short int               int16_t;
   typedef int                     int32_t;
   typedef __int64                 int64_t;
   typedef unsigned char           uint8_t;
   typedef unsigned short int      uint16_t;
   typedef unsigned int            uint32_t;
   typedef unsigned __int64        uint64_t;
#  define STDINT_TYPES_DEFINED
# elif defined(__VMS) /* OpenVMS provides these types in inttypes.h */
#  include <inttypes.h>
#  define STDINT_TYPES_DEFINED
# elif defined(__CYGWIN__)
   /* Cygwin defines the signed versions in sys/types.h */
   /* but uses a u_ prefix for the unsigned versions */
   typedef u_int8_t                uint8_t;
   typedef u_int16_t               uint16_t;
   typedef u_int32_t               uint32_t;
   typedef u_int64_t               uint64_t;
#  define STDINT_TYPES_DEFINED
# endif
   /* other archs may want to add defines here,
      or use the fallbacks in std.h */
#endif

/* fall back to tests based on arch.h */
#ifndef STDINT_TYPES_DEFINED
/* 8 bit types */
# if ARCH_SIZEOF_CHAR == 1
typedef signed char int8_t;
typedef unsigned char uint8_t;
# endif
/* 16 bit types */
# if ARCH_SIZEOF_SHORT == 2
typedef signed short int16_t;
typedef unsigned short uint16_t;
# else
#  if ARCH_SIZEOF_INT == 2
typedef signed int int16_t;
typedef unsigned int uint16_t;
#  endif
# endif
/* 32 bit types */
# if ARCH_SIZEOF_INT == 4
typedef signed int int32_t;
typedef unsigned int uint32_t;
# else
#  if ARCH_SIZEOF_LONG == 4
typedef signed long int32_t;
typedef unsigned long uint32_t;
#  else
#   if ARCH_SIZEOF_SHORT == 4
typedef signed short int32_t;
typedef unsigned short uint32_t;
#   endif
#  endif
# endif
/* 64 bit types */
# if ARCH_SIZEOF_INT == 8
typedef signed int int64_t;
typedef unsigned int uint64_t;
# else
#  if ARCH_SIZEOF_LONG == 8
typedef signed long int64_t;
typedef unsigned long uint64_t;
#  endif
# endif
#  define STDINT_TYPES_DEFINED
#endif /* STDINT_TYPES_DEFINED */

#endif /* stdint__INCLUDED */




0
kij_82 Messages postés 4089 Date d'inscription jeudi 7 avril 2005 Statut Contributeur Dernière intervention 30 septembre 2013 857
2 mars 2007 à 16:16
Up, il n'y aucun fervant utilisateur de ghostscript dans les lieux ? :)
0
kij_82 Messages postés 4089 Date d'inscription jeudi 7 avril 2005 Statut Contributeur Dernière intervention 30 septembre 2013 857
6 mars 2007 à 10:30
Re Up ^^
0