Projet

Général

Profil

Anomalie #2146

Pétage des fonts de cerations pdf après signatures

Ajouté par Clément Leneveu il y a plus d'un an. Mis à jour il y a plus d'un an.

Statut:
Résolu
Priorité:
Normal
Assigné à:
Version cible:
Début:
Echéance:
% réalisé:

100%


Description

Après signature certains pdf sont illisibles (cf. https://guichet.centrale-marseille.fr/cri/front/ticket.form.php?id=15243)

CAUSE :
Alors résultats c'est encore un problème ghostscript. Dans le détail de ce que fait l'appli quand on signe :

  1. on normalize avec GS ==> fonctionne
  2. on ajoute la signature calligraphique ==> ça marche encore, si on sauvegarde le pdf juste à ce moment là on arrive encore à le lire
  3. Par contre la ligne de commande suivante (appelé dans la méthode convertGS de la classe PdfService.java) engendre un pétage :
  • P5_CJ_01_test_before.pdf le fichier pdf avec signature mais pas encore converti en pdf/A donc lisible
  • P5_CJ_01_test_before_converted.pdf : le fichier converti et illisible
gs -dPDFA=2 -dNOSAFER -dBATCH -sFONTPATH=/usr/share/fonts -dNOPAUSE -dSubsetFonts=false -dEmbedAllFonts=true -dAlignToPixels=0 -dGridFitTT=2 -dCompatibilityLevel=1.4 -sColorConversionStrategy=RGB -sDEVICE=pdfwrite -dPDFA
CompatibilityPolicy=1 -sOutputFile='P5_CJ_01_test_before_converted.pdf' '/tmp/PDFA_def.ps' P5_CJ_01_test_before.pdf

Pétage dans la lecture du document et il y a même un message d'erreur ghostscript :

GPL Ghostscript 9.53.3 (2020-10-01) 
Copyright (C) 2020 Artifex Software, Inc.  All rights reserved. 
This software is supplied under the GNU AGPLv3 and comes with NO WARRANTY: 
see the file COPYING for details. 
GPL Ghostscript 9.53.3: UTF16BE text string detected in DOCINFO cannot be represented in XMP for PDF/A1, discarding DOCINFO 
Processing pages 1 through 1. 
Page 1 
GPL Ghostscript 9.53.3: Annotation set to non-printing, 
not permitted in PDF/A, annotation will not be present in output file

CORRECTION :

Il faut mettre la valeur du paramètre dPDFA à 1 dns application.yml :

pdf:
  convert-to-pdf-a: true
  pdf-a-level: 1
  path-to-g-s: /usr/bin/gs
  path-to-fonts : /usr/share/fonts
  pdf-to-image-dpi: 72

cf. deuxième ligne ==> changer dans le group_vars des ansibleries

P5_CJ_01.pdf (117 ko) P5_CJ_01.pdf pour tester Clément Leneveu, 12/12/2022 15:29

Révisions associées

Révision 214d0215 (diff)
Ajouté par Clément Leneveu il y a plus d'un an

fixes #2146 : update application.yml in app dev mode

Historique

#1 Mis à jour par Clément Leneveu il y a plus d'un an

  • % réalisé changé de 0 à 100
  • Statut changé de Nouveau à Résolu

Formats disponibles : Atom PDF