Giter Club home page Giter Club logo

email-to-pdf-converter's Introduction

Email to PDF Converter (formely EML to PDF Converter) Actions Status

This software can be used to convert email files (eml or msg) to pdf files. It can be used as a library, command line tool or desktop application with its GUI.

The conversion is done by parsing (and cleaning) the mime/structure, converting it to html and then using wkhtmltopdf to convert the generated html to a pdf file.

It also handles inline images, corrupt mime headers and can use a proxy.

Download

You can download the lates binaries here.

There you can find a Windows setup.exe and a jar.
If you want to use the jar (e.g. for a non Windows OS) you need the wkhtmltopdf binary in the PATH.

Screenshot

Commandline Interface

Usage: EmailToPDFConverter [options] <email-file>
  Options:
    -d, --debug
      Debug mode
      Default: false
    -e, --error
      Display only Error messages.
      Default: false
    -a, --extract-attachments
      Extract Attachments.
      Default: false
    -ad, --extract-attachments-directory
      Extract Attachments to this Directory, if this option is not present the
      directory is besides the pdf as "<pdf-name>-attachments".
    -?, --help
      Print this help.
    -hh, --hide-headers
      Do not add email headers (subject, from, etc.) at the beginning of the
      PDF document.
      Default: false
    -o, --output-filepath
      Filepath of the produced PDF document. If this option is ommited the PDF
      will be placed alongside the email File.
    -s, --page-size
      Set wkhtmltopdf paper size to: A4, Letter, etc. (default A4)
      Default: A4
    -p, --proxy
      Proxy (e.g. "http://10.64.1.74:81"). If "auto" is supplied the default
      system proxy will be used.
    -q, --quiet
      Do not display any messages at all.
      Default: false
    -gui, --show-graphical-user-interface
      Show graphical user interface (other parameters are ignored when using
      this switch).
      Default: false
    -v, --version
      Print the version number.
      Default: false

E.g. java -jar emailconverter-2.1.1-all.jar example.eml (you need wkhtmltopdf binary in the PATH)

How to Build

You need to git clone this repository. The build will fail if you remove the .git folder (e.g. download this as zip from github).

  • gradlew shadowJar
    Creates a single self contained Jar in build/libs

  • gradlew dist
    Same as gradlew shadowJar but additionally creates windows exe launchers in build/libs for gui and console mode. This task needs the Launch4j binary in the PATH.

  • gradlew innosetup
    Creates a windows setup in build/innosetup. This task needs the Launch4j binary as well as the Inno Setup issc.exe in the PATH.

  • gradlew check
    Executes the unit tests and generates various reports (jacoco, checkstyle, findbugs, jdepend, unit test report).

Date Formatting

Dates are formatted with the default locale. You can change it, e.g. by passing the VM argument -Duser.language=en-US similar to setting the timezone e.g. -Duser.timezone="Asia/Kolkata".

License

The code is available under the terms of the Apache V2 License.

email-to-pdf-converter's People

Contributors

dmserebr avatar nickrussler avatar softproject-dev avatar thausherr avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.