A really neat tool I was introduced to a few days back is Un outil vraiment bien j'ai été présenté à quelques jours en arrière est wkhtmltopdf wkhtmltopdf , a freely distributed tool that allows you to convert HTML pages into PDF documents. , Un outil distribué librement qui vous permet de convertir des pages HTML en documents PDF. This is not something I've found a lot of use for too often, but when I've needed it it's been a life saver. Ce n'est pas quelque chose que j'ai trouvé beaucoup de l'utilisation trop souvent, mais quand je l'ai besoin de ça a été une bouée de sauvetage. Let's take a look at how to set it up and use it. Jetons un regard sur la façon de le configurer et l'utiliser.
The installation of wkhtmltopdf is a lot less difficult that trying to pronounce the name of the project. L'installation de wkhtmltopdf est beaucoup moins difficile que tenter de prononcer le nom du projet. As the project is not yet distributed as installable binaries you will need to compile it. Comme le projet n'est pas encore distribués sous forme de binaires à installer, vous devez le compiler.
Requirements: Exigences:
- QT 4.4 or above - Qt 4.4 ou supérieur
- CMake 1.6 or above - CMake 1.6 ou supérieur
- Subvertion - Subvertion
On Ubuntu do the following to install the tools required to compile: Sous Ubuntu procédez comme suit pour installer les outils nécessaires pour compiler:
# sudo apt-get update # Sudo apt-get update
# sudo apt-get install libqt4-dev qt4-dev-tools build-essential cmake # Sudo apt-get install libqt4-dev qt4-dev-tools build-cmake essentiels
Now check out the latest code for the application from the project's SVN repositories. Vérifiez maintenant les dernières versions du code d'application à partir des référentiels SVN du projet.
# svn checkout http://wkhtmltopdf.googlecode.com/svn/trunk/ wkhtmltopdf # Svn checkout http://wkhtmltopdf.googlecode.com/svn/trunk/ wkhtmltopdf
Time to build and compile it: Temps de construire et de les compiler:
# cd wkhtmltopdf # Wkhtmltopdf cd
# cmake -D CMAKE_INSTALL_PREFIX=/usr . # Cmake-D CMAKE_INSTALL_PREFIX = / usr.
# make # Make
# sudo make install # Sudo make install
Once you are done with the previous steps using wkhtmltopdf is a piece of cake. Une fois que vous avez fini avec les étapes précédentes en utilisant wkhtmltopdf est un morceau de gâteau. To convert a web page from HTML to PDF all you need to do is to run the following command: Pour convertir une page Web à partir de HTML en PDF tout ce que vous avez à faire est d'exécuter la commande suivante:
# wkhtmltopdf http://www.simplehelp.net simplehelp.pdf # Simplehelp.pdf http://www.simplehelp.net wkhtmltopdf
The previous command will access the website http://www.simplehelp.net and create a PDF document with its contents. La commande précédente http://www.simplehelp.net auront accès au site Web et créer un document PDF sur son contenu. You obviously need a working Internet connection for this to work. Vous avez évidemment besoin d'une connexion Internet pour que cela fonctionne. You can also modify the above command slightly to convert an HTML file stored on your computer into a PDF document: Vous pouvez aussi modifier la commande ci-dessus légèrement pour convertir un fichier HTML stocké sur votre ordinateur en un document au format PDF:
# wkhtmltopdf /home/calvin/sevenacross.html sevenacross.pdf # Wkhtmltopdf / home / calvin / sevenacross.pdf sevenacross.html
Pretty neat stuff, eh! wkhtmltopdf has several options allowing you to make the PDF document in Portrait mode or Landscape, and so on. Pretty trucs sympa, hein! Wkhtmltopdf a plusieurs options vous permettant de rendre le document PDF en mode portrait ou paysage, et ainsi de suite. Visit the project's website for more info on it. Visitez le site Internet du projet pour en savoir plus sur elle.























One Response One Response
Stay in touch with the conversation, subscribe to the Restez en contact avec la conversation, vous abonner à la RSS feed for comments on this post Flux RSS pour les commentaires sur ce post . .
Continuing the Discussion Poursuivre le débat