Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 1.19 KB

README.adoc

File metadata and controls

37 lines (25 loc) · 1.19 KB

VeloPdf2Eml

VeloEml2Pdf converts emails from ".eml" format to PDF (Portable Document Format) using Apache-Velocity and flying-saucer-pdf library.

Table of Contents

VeloEml2Pdf - library

String velocityTemplateFilePath = "src/main/resources/emlTemplateV2.html";
String inputFileEmlPath = "src/main/resources/example-eml-files/example_mail_200520013502983.eml";
String outputFilePdfPath = FilenameUtils.getBaseName(inputFileEmlPath) + "_" +  new SimpleDateFormat("yyyyMMdd_HH-mm-ss").format(new Date()) + ".pdf";
Boolean ok = VeloEml2Pdf.convertEml2Pdf(velocityTemplateFilePath, inputFileEmlPath, outputFilePdfPath);

VeloEml2PdfCli - command-line usage

for command-line usage you have to add 3 parameters:

  • -t or -velocityTemplateFilePath

  • -i or -inputFileEmlPath

  • -o or -outputFilePdfPath

java -jar veloEml2Pdf-1.0-SNAPSHOT.jar -velocityTemplateFilePath "src/main/resources/emlTemplateV2.html" -inputFileEmlPath "src/main/resources/example-eml-files/mail.eml" -outputFilePdfPath "Test_1.pdf"

License Summary