Créer un fichier PDF avec Python

Résolu/Fermé
angy21 Messages postés 39 Date d'inscription vendredi 5 mars 2004 Statut Membre Dernière intervention 26 juin 2007 - 4 mai 2005 à 21:18
sebsauvage Messages postés 32893 Date d'inscription mercredi 29 août 2001 Statut Modérateur Dernière intervention 21 octobre 2019 - 20 mars 2009 à 23:56
Bonjour,

Pouvez-vous svp me dire si il est possible grace à Python de créer un fichier au format PDF a partir d'un fichier TXT ?

Si oui, pouvez-vous m'éclairer un peu plus ?

Merci par avance pour votre aide.

14 réponses

sebsauvage Messages postés 32893 Date d'inscription mercredi 29 août 2001 Statut Modérateur Dernière intervention 21 octobre 2019 15 655
4 mai 2005 à 21:27
Pouvez-vous svp me dire si il est possible grace à Python de créer un fichier au format PDF a partir d'un fichier TXT ?

Oui !

Il existe plusieurs librairie.
Par exemple celle de ReportLab:
http://www.reportlab.org/rl_toolkit.html

Voici un exemple pour créer un PDF avec Python:
http://vsbabu.org/mt/archives/2002/09/19/reportlab_python_pdf.html

Facile, non ?

Voir également l'article chez IBM:
http://www-106.ibm.com/developerworks/linux/library/l-sc6.html?loc=dwmain
2