Skip to content

Command line utility to print WhatsApp conversations to PDF.

Notifications You must be signed in to change notification settings

connollyst/whatsapp2pdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WhatsApp2PDF

WhatsApp2PDF is a command line utility, written in Scala, to process WhatsApp conversation dumps to formatted PDF.

Use - Mac

Open Mac's command line terminal (Applications > Utilities > Terminal) and navigate to whatsapp2pdf, for example:

cd ~/Dropbox/whatsapp2pdf/

The simplest use case is to run the tool on a single file:

./whatsapp2pdf file.txt

This will produce file.pdf in your current directory.

You can hand whatsapp2pdf any number of files:

./whatsapp2pdf file_1.txt file_2.txt file_3.txt

Which will result in file_1.pdf, file_2.pdf, and file_3.pdf in your current directory.

You can specify the output directory with the -o flag:

./whatsapp2pdf file.txt -o pdfs/

Use - Windows

Input Format

The only accepted input format for the text files to be converted to PDF, is a direct export of a WhatsApp conversation.

To export a conversation from WhatsApp:

  • Open WhatsApp
  • Navigate to the conversation
  • Tap the ... button in the top right to open the conversation menu.
  • Select More, the last option in the menu.
  • Choose Email Conversation
  • If you want to include images in the resulting PDF, select Attach media.

Note that most email providers have a limit on email sizes.

Notes

If attachments are to be included in the PDF, they need to be located in the same directory as the text file.

Build

To build WhatsApp2PDF from source, you will need a Java Development Kit (JDK), Maven, and an internet connection. All dependencies (including the Scala compiler) will be downloaded by Maven.

With your environment all set up, the following commands will download the source code and build WhatsApp2PDF..

git clone [email protected]:connollyst/whatsapp2pdf
cd whatsapp2pdf
mvn clean package

This will produce target/whatsapp2pdf.jar

About

Command line utility to print WhatsApp conversations to PDF.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published