Noob: save emails as .pdf

Ibanez | Jan

Just posting .gifs
Dec 1, 2009
1,014
19
0
Ola!

I need to save a shitload of Facebook payment receipts (like 1k) as .pdf files. All receipts are emails and stored in yahoo / ymail mailboxes. Is there a quick and easy way to automate this? I don't want to spend the next two weeks hitting CMD+P.

Tl;dr: save email as .pdf file.

Thanks!
 


What about downloading them to your hard drive (for example .txt files) and then code a little print-em-all script?!...
 
I'm not familiar with Yahoo email, but here are some ideas.

A) Download your emails via POP connection to a client like Thunderbird or Outlook. I don't use a local email client, but maybe they have some pdf backup system baked in.

or

B) Yahoo might provide some sort of flat file export, like a bunch of individual html files.

Once you have the files local, it doesn't take more than a few lines in any language with a pdf library:

Code:
require "pdfkit"
Dir.glob('/path/to/dir/*.html') do |html_file|
  kit = PDFKit.new(File.new(html_file), page_size: 'Letter')
  kit.to_file('/path/to/save/pdf')
end
 
I'm not familiar with Yahoo email, but here are some ideas.

A) Download your emails via POP connection to a client like Thunderbird or Outlook. I don't use a local email client, but maybe they have some pdf backup system baked in.

I think they still require a Yahoo Plus upgrade for pop access on most accounts, but you can get around it by changing your "preferred content" setting to Yahoo Asia for free pop access.

Free POP3 access to Yahoo! Mail - PicTutorial | Google