LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-20-2023, 11:31 AM   #1
rblampain
Senior Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 11
Posts: 1,288

Rep: Reputation: 52
how can I convert eml files to pdf files


I have a directory with hundreds of emails downloaded from my email service provider as eml files and I need them converted as pdf files.
How can I do that programmatically?
Or
Is there a way to use the browser to download a whole directory of emails as pdf files rather than one at a time?

It seems I can use Thunderbird but having Debian 9 as my OS, I have to install a newer OS version to install Thunderbird which I am in the process of doing.
I also had installed Evolution but have not found if there is a way to use it to accomplish that objective.

Thank you for your help.
 
Old 05-20-2023, 11:51 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by rblampain View Post
I have a directory with hundreds of emails downloaded from my email service provider as eml files and I need them converted as pdf files.
How can I do that programmatically? Or Is there a way to use the browser to download a whole directory of emails as pdf files rather than one at a time?

It seems I can use Thunderbird but having Debian 9 as my OS, I have to install a newer OS version to install Thunderbird which I am in the process of doing.
I also had installed Evolution but have not found if there is a way to use it to accomplish that objective.
Several ways, including just using Thunderbird to do it:
  • <Assumes you already have Thunderbird installed and the files are already .eml in Thunderbird>
  • Right-click on the folders containing EML email messages.
  • Select the import/export tool and then "Export all Messages in the folder".
  • In the export options use PDF as the destination type, and the folder to save them.
  • Click "OK"
Also an open-source utility that may work too:
https://github.com/nickrussler/email-to-pdf-converter
 
2 members found this post helpful.
Old 06-03-2023, 02:52 PM   #3
ACRIzona
Member
 
Registered: Dec 2007
Location: Phoenix
Distribution: iMAC(64) Mint & Q4os
Posts: 82

Rep: Reputation: Disabled
The drop-dead simplest is to add a "PDF-printer" to your CUPS printers list.

It prints what-ever to a file.pdf in your where-ever folder !


Aussie mate ! you should know all those old PUPPY tricks !

Last edited by ACRIzona; 06-03-2023 at 02:57 PM.
 
Old 06-03-2023, 05:14 PM   #4
uteck
Senior Member
 
Registered: Oct 2003
Location: Elgin,IL,USA
Distribution: Ubuntu based stuff for the most part
Posts: 1,173

Rep: Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501
Searching I found Mhonarc to convert eml to html, then you can convert it to PDF.
Should be in most distor repos for install.
https://www.mhonarc.org/MHonArc/doc/...t.html#folders
 
Old 06-05-2023, 12:15 AM   #5
Michael Uplawski
Senior Member
 
Registered: Dec 2015
Posts: 1,622
Blog Entries: 40

Rep: Reputation: Disabled
I have once programmed a tool for eml2pdf conversions which is even largely configurable. In the meantime, I prefer to use it on the command-line, but a Gtk-GUI is still available.
Screen Shot from this morning.
Each of the mails in each of the selected (and active) eml-fils will result in 1 PDF, mail-attachments can be stored as PDF-attachment or be linked.., etc.

Unfortunately, though, my last programming language (in this life) is Ruby. A Ruby-interpreter must be installed:

https://rubygems.org/gems/cremefraiche

Installation instructions are on the same page.
The usage-message for the command-line version:
Code:
scott@flowers:~$ cremefraiche
 ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
 ┃                Creme Fraiche version 1.1.5                ┃
 ┃                       EML to PDF converter                ┃
 ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

 © 2011 - 2023 Michael Uplawski <michael.uplawski@uplawski.eu>

 Running with Ruby 3.1.2 on x86_64-linux-gnu

 Usage:
▔▔▔▔▔▔
 	user@machine:~$ cremefraiche [eml_file1.eml] <eml_file2.eml ... eml_file(n).eml>

 This produces 1 PDF-file for each individual email found in the given eml-file(s).
 Please see the file 'config' in the program- or gem-folder for some options:
 	/home/michael/.cremefraiche/config

 To create or update a user-version of the configuration-file:
▔▔▔▔▔▔
 	user@machine:~$ ruby cremefraiche user-conf

 Use literally 'user-conf' as argument. This either creates or overwrites a 
 configuration file in a sub-directory '.cremefraiche' of the current user's home-directory


This program is free software under the terms of the GNU General Public License
version 3 or any later version. It is provided as is with no guarantees of any kind.

Blog-Post on LQ
Attached Thumbnails
Click image for larger version

Name:	sc_cremefraicheGui.png
Views:	87
Size:	17.1 KB
ID:	41149  

Last edited by Michael Uplawski; 06-05-2023 at 11:10 AM. Reason: stuff
 
1 members found this post helpful.
Old 06-14-2023, 01:33 PM   #6
shaunpatterson
LQ Newbie
 
Registered: Jun 2023
Posts: 1

Rep: Reputation: 0
Sorry shaunpatterson, I deleted your info. Not really super helpful for linux users. Didn't want to confuse the thread.

Last edited by jefro; 06-14-2023 at 02:04 PM.
 
Old 06-14-2023, 01:48 PM   #7
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by shaunpatterson View Post
To convert EML files to PDF files, you can follow these steps:
Post edited out to provide clarity hopefully
Acrobat hasn't been supported on Linux for more than ten years now. Mentioning Windows utilities that you have to pay for on a Linux forum is fairly pointless. Did you read any of the previous answers that actually DO work on Linux, for free???

Last edited by jefro; 06-14-2023 at 02:05 PM.
 
Old 06-14-2023, 02:10 PM   #8
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,985

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
Open or Libreoffice might be installed to use it to print to pdf.?
 
Old 06-14-2023, 03:00 PM   #9
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by jefro View Post
Open or Libreoffice might be installed to use it to print to pdf.?
Nope, that isn't an option, since Libreoffice can't open .EML files. The OP has been given several solutions already.
 
Old 06-14-2023, 03:17 PM   #10
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,985

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
Dang, so used to it being able to open almost everything.
 
Old 11-19-2023, 11:24 PM   #11
jackera
LQ Newbie
 
Registered: Nov 2023
Posts: 2

Rep: Reputation: 0
If you are looking for a solution to convert EML files to PDF format then try linux
By following above steps, you can easily convert EML files to PDF format.

Last edited by jefro; 11-21-2023 at 04:54 PM.
 
Old 11-20-2023, 07:40 AM   #12
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by jackera View Post
If you are looking for a solution to convert EML files to PDF format then try <MY SPAM SOFTWARE> EML to PDF Converter tool on your system. With this software, you can export EML files to PDF in a few seconds. The software can convert multiple EML files to PDF at once. It preserves 100% data integrity and folder hierarchy during EML to PDF conversion. You can download its free demo version and convert EML files to PDF in a few simple clicks.
1. Run this software on your system.
2. Add EML files into software.
3. Choose PDF as saving options.
4. Browse target location and then press Convert button.
By following above steps, you can easily convert EML files to PDF format.
Spammer and spam reported.
 
Old 03-19-2024, 01:37 AM   #13
alora01
LQ Newbie
 
Registered: Dec 2023
Posts: 2

Rep: Reputation: 0
To change a bunch of EML files into PDFs automatically, you can use different tools

Last edited by jefro; 03-19-2024 at 03:31 PM.
 
Old 03-19-2024, 07:23 AM   #14
Michael Uplawski
Senior Member
 
Registered: Dec 2015
Posts: 1,622
Blog Entries: 40

Rep: Reputation: Disabled
Quote:
Originally Posted by alora01 View Post
So, to summarize, if you want to do it automatically, think about using Python. If you're looking for a browser-based way, see what options your email service gives you or wait until you can use Thunderbird or something similar.
So, to summarize, think about any full-blown programming language or other tool.
 
Old 03-19-2024, 08:10 AM   #15
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by alora01 View Post
To change a bunch of EML files into PDFs automatically, you can use different tools and libraries made for this job. One common way is by using Python along with libraries like email.parser to understand EML files and ReportLab to create PDFs. You write a script that goes through each EML file in the folder, reads its content, and then makes a matching PDF file.

If you want to download a whole bunch of emails as PDFs using a browser, it depends on what your email service lets you do. Some services allow you to download many emails at once, or they work with other tools that can do this. If your service doesn't have this option, you might need to use email programs like Thunderbird or Evolution, which are better at handling lots of emails and can export them as PDFs.

Since you're getting ready to install Thunderbird, you could try using it once it's set up because it has an easy way to save emails as PDFs. With Evolution, it's mainly an email program, so it might not have a built-in way to ***VISIT MY SPAM LINK*** convert EML to PDF in bulk at once. But you could check if there are add-ons or extras that can help with this.

So, to summarize, if you want to do it automatically, think about using Python. If you're looking for a browser-based way, see what options your email service gives you or wait until you can use Thunderbird or something similar.
Yet another spammer; reported.
 
  


Reply

Tags
pdf



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to open an EML file in Ubuntu 22.10 ? (eml, outlook stuff) openbsd98324 Linux - Software 1 03-01-2023 11:42 AM
[SOLVED] .eml files, How to decrypt them? kaz2100 Linux - Software 2 12-26-2018 06:11 PM
[SOLVED] unzip-like programm to Unpack EML data files ? uneml? Xeratul Linux - Software 2 07-22-2017 09:55 AM
LXer: Extracting EML files LXer Syndicated Linux News 0 09-21-2011 09:50 AM
POSTFIX export emails as eml files officecase Linux - Server 2 04-07-2009 11:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration