### Example Usage of Email to PDF Converter Source: https://github.com/nickrussler/email-to-pdf-converter/blob/main/README.md This command demonstrates how to run the Email to PDF Converter from the command line using a JAR file. Ensure wkhtmltopdf is in your system's PATH. ```bash java -jar emailconverter-2.1.1-all.jar example.eml ``` -------------------------------- ### Build Email to PDF Converter with Gradle Source: https://github.com/nickrussler/email-to-pdf-converter/blob/main/README.md These commands show how to build the Email to PDF Converter project using Gradle. Different tasks produce different output formats, such as a self-contained JAR or executable launchers. ```bash gradlew shadowJar ``` ```bash gradlew dist ``` ```bash gradlew innosetup ``` ```bash gradlew check ``` -------------------------------- ### Configure Date Formatting and Timezone Source: https://github.com/nickrussler/email-to-pdf-converter/blob/main/README.md This shows how to set the default locale and timezone for date formatting by passing VM arguments. This is useful for ensuring consistent date representation across different environments. ```bash -Duser.language=en-US ``` ```bash -Duser.timezone="Asia/Kolkata" ``` -------------------------------- ### Email to PDF Converter Command Line Usage Source: https://github.com/nickrussler/email-to-pdf-converter/blob/main/README.md This displays the available command-line options for the EmailToPDFConverter tool. Use this to understand how to customize the conversion process. ```bash Usage: EmailToPDFConverter [options] Options: -d, --debug Debug mode Default: false -e, --error Display only Error messages. Default: false -aa, --add-attachment-names Add the list of attachment names under the body text 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 "-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 -r, --dpi Set wkhtmltopdf DPI. (default 300) Default: 300 -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 ``` -------------------------------- ### Dynamic Height Adjustment Timer Source: https://github.com/nickrussler/email-to-pdf-converter/blob/main/src/main/resources/header.html This JavaScript function recursively calls itself using setTimeout to continuously post the document's maximum height to the parent window. This is crucial for iframes to correctly size themselves based on their content. ```javascript function timer() { try { parent.postMessage(Math.max(document.body.offsetHeight, document.body.scrollHeight), '*'); } catch (r) { } setTimeout(timer, 10); }; timer(); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.