Site de Jean-Michel RICHER

Maître de Conférences en Informatique à l'Université d'Angers

Divers





Convertir du code en pdf

On utilise highlight avec le thème edit-xcode pour avoir un fond blanc. On obtient un fichier au format html. On convertit ensuite le html en pdf grâce à google-chrome.

\$highlight --encoding=utf-8 --out-format=html --style=edit-xcode  --font-size=8 \
	--line-numbers a.py -o a.html
\$google-chrome --headless --disable-gpu --print-to-pdf=a.pdf a.html