Package Details: email2pdf 0.9.5.1-1

Git Clone URL: https://aur.archlinux.org/email2pdf.git (read-only, click to copy)
Package Base: email2pdf
Description: Convert EML files to PDF.
Upstream URL: https://github.com/andrewferrier/email2pdf
Licenses: MIT
Submitter: ImNtReal
Maintainer: ImNtReal
Last Packager: ImNtReal
Votes: 4
Popularity: 0.000000
First Submitted: 2017-05-09 17:48 (UTC)
Last Updated: 2019-04-11 14:11 (UTC)

Latest Comments

Giovani_Geek commented on 2025-07-19 02:29 (UTC)

--- /bin/email2pdf  2025-03-12 10:58:33.000000000 -0600
+++ email2pdf-fixed 2024-10-07 20:04:55.764387109 -0600
@@ -23,8 +23,8 @@
 import tempfile
 import traceback

-from PyPDF2 import PdfFileReader, PdfFileWriter
-from PyPDF2.generic import NameObject, createStringObject
+from PyPDF2 import PdfReader, PdfWriter
+from PyPDF2.generic import NameObject, create_string_object
 from bs4 import BeautifulSoup
 from requests.exceptions import RequestException
 import magic
@@ -514,21 +514,21 @@
     full_update_dictionary = {add_prefix(k): v for k, v in update_dictionary.items()}

     with open(filename, 'rb') as input_file:
-        pdf_input = PdfFileReader(input_file)
-        pdf_output = PdfFileWriter()
+        pdf_input = PdfReader(input_file)
+        pdf_output = PdfWriter()

-        for page in range(pdf_input.getNumPages()):
-            pdf_output.addPage(pdf_input.getPage(page))
+        for page in range(len(pdf_input.pages)):
+            pdf_output.add_page(pdf_input.pages[page])

-        info_dict = pdf_output._info.getObject()
+        info_dict = pdf_output._info.get_object()

-        info = pdf_input.documentInfo
+        info = pdf_input.metadata

         full_update_dictionary = dict(chain(info.items(), full_update_dictionary.items()))

         for key in full_update_dictionary:
             assert full_update_dictionary[key] is not None
-            info_dict.update({NameObject(key): createStringObject(full_update_dictionary[key])})
+            info_dict.update({NameObject(key): create_string_object(full_update_dictionary[key])})

         os_file_out, temp_file_name = tempfile.mkstemp(prefix="email2pdf_add_update_pdf_metadata", suffix=".pdf")
         # Immediately close the file as created to work around issue on

Marte2007 commented on 2017-09-22 08:37 (UTC)

You should install the script to /usr/bin instead of /bin and using mode 755, also the dependency on wkhtmltopdf is missing.