在 C# 中将 Eml/Msg 转换为 pdf 的 API

发布于 2024-07-14 03:39:00 字数 1539 浏览 7 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

小苏打饼 2024-07-21 03:39:00

我们有类似的任务,但规模要小得多,而且这是一个临时解决方案。 我们将 EML 文件转换为 HTML 页面,然后使用 ABC Pdf 组件(我认为他们当时有一个免费版本?)从 HTML 页面创建 PDF 文件。 我们直接从 ASP.NET 页面完成所有操作。

We had a similar task, but on a much smaller scale and it was a temporary solution. We converted the EML files to HTML pages and then used the ABC Pdf component (I think they had a free version back then?) to create the PDF files out of the HTML pages. We did everything directly from the ASP.NET page.

冷清清 2024-07-21 03:39:00

使用 OpenOffice (http://www.openoffice.org)

这基本上会将任何内容转换为 PDF(doc、xls 、ppt、txt)。 既然 eml 只是 txt,为什么不直接使用这个呢? 请参阅http://www.opendocument4all.com/download/OpenOffice.net.pdf 了解如何在 C# 中使用 OpenOffice。

Use OpenOffice (http://www.openoffice.org)

This will basically convert anything to PDF (doc, xls, ppt, txt). Since eml are just txt, why not just use this? See http://www.opendocument4all.com/download/OpenOffice.net.pdf for how to use OpenOffice in C#.

娇女薄笑 2024-07-21 03:39:00

你不能直接把文件打印成pdf吗?

编辑:我想我所说的不是寻找 .eml 到 .pdf 转换工具; 您可以寻找一个批量打印工具,可以自动打印 100 个或 1000 个 .eml。 然后你只需将工具批量打印为pdf即可。

Couldn't you just print the file to pdf?

Edit: I guess what I'm saying is rather than looking for a .eml to .pdf conversion tool; you could look for a batch printing tool that can automate the printing of 100's or 1000's of .eml's. Then you just make the tool batch print to pdf.

忆梦 2024-07-21 03:39:00

当 Microsoft Outlook 实用程序获取电子邮件并将其另存为计算机文件时,该邮件通常以 MSG 文件格式存储。 计算机用户传统上需要 Microsoft Outlook 或能够读取 MSG 文件格式的类似程序来访问该文件中包含的信息。 值得庆幸的是,用户不再受到这些限制的困扰。 PST Viewer Pro 是一款实用程序,可以根据您的特定需求成功地将 Outlook MSG 文件导出为各种不同的文件格式。 例如,您只需单击几下鼠标即可将 MSG 文件转换为 Adob​​e 流行的 PDF 文件格式。

步骤 1

使用 PST Viewer Pro“资源管理器树”突出显示存储 MSG 文件的目录。 “资源管理器树”是沿着 PST Viewer Pro 程序窗口左侧运行的列的名称。 它的外观类似于 Microsoft Windows 资源管理器中的标准文件夹树。 您选择的任何目录的内容将逐项列出并显示在窗口顶部的“邮件列表”中。

步骤 2

在“邮件列表”中单击您想要转换的 MSG 文件。 您选择的任何消息的内容将显示在邮件列表的底部。 浏览您选择的 MSG 文件,直到找到您想要转换的文件。

步骤 3

从 PST Viewer Pro 顶部的下拉菜单中选择适当的 PDF 设置。 您可以选择总共七种 PDF 设置,包括“PDF – 嵌入附件”、“PDF – 转换/包含附件”、“PDF – 附件保存到磁盘”等等。 根据您的需求进行适当的选择。

步骤 4

右键单击​​“邮件列表”中的 MSG 文件,然后选择“导出”选项。 请注意,您还可以从 PST Viewer Pro 顶部的“导出”下拉菜单中选择“导出”选项。 此外,您还可以同时按键盘上的 CTRLE。 所有三种方法都会打开转换文件所需的窗口。

第 5 步

在列表中单击一次您要用来保存 PDF 的文件夹。 您还可以选择“创建新文件夹”按钮在当前查看的目录中创建新文件夹。 做出选择后,单击“确定”。 PST Viewer Pro 将获取原始 MSG 文件的内容,并根据您的规格将其转换为 PDF 格式。

您可以通过查看保存文件的目录并使用 Adob​​e Reader 等程序打开它来检查 PDF 转换是否成功。 然后,转换后的 PDF 文件可以以附件的形式通过电子邮件发送给您选择的任何收件人。 您还可以根据需要将文件备份到硬盘或外部 USB 闪存驱动器以供存档。

有更多关于如何将 eml 文件导出为 pdf 的教程 http:// www.emlviewer.net/2012/08/eml-to-pdf.html

When the Microsoft Outlook utility takes an e-mail message and saves it as a computer file, that message is typically stored in the MSG file format. A computer user would then traditionally need Microsoft Outlook, or a similar program capable of reading the MSG file format, to access the information contained within that file. Thankfully, users are no longer burdened with these kinds of restrictions. PST Viewer Pro is a utility that can successfully export an Outlook MSG file into a wide variety of different file formats based on your specific needs. For example, you can take an MSG file and convert it to Adobe’s popular PDF file format in just a few short mouse clicks.

Step 1

Highlight the directory where your MSG file is stored using the PST Viewer Pro “Explorer Tree.” The “Explorer Tree” is the name of the column that runs along the left side of the PST Viewer Pro program window. It is similar in appearance to a standard folder tree in Microsoft’s Windows Explorer. The contents of any directory that you select will be itemized and displayed in the “Mail List” at the top of the window.

Step 2

Click on the MSG file you wish to convert in the “Mail List.” The contents of any message you select will appear in the bottom portion of the mail list. Go through the MSG files you have selected until you find the one you want to convert.

Step 3

Select the appropriate PDF settings from the drop down menu at the top of PST Viewer Pro. There are seven total PDF settings that you can choose from including “PDF – attachments embedded,” “PDF – attachments converted/included,” “PDF – attachments saved to disk” and more. Make the appropriate selection based on your needs.

Step 4

Right-click on the MSG file in the “Mail List” and select the “Export” option. Note that you can also select the “Export” option from the “Export” drop down menu at the top of PST Viewer Pro. In addition, you can also press CTRL and E on your keyboard simultaneously. All three methods will open the window needed to convert the file.

Step 5

Click one time on the listing for the folder you want to use to save your PDF. You can also select the “Make a New Folder” button to create a new folder in the directory you’re currently viewing. Once you’ve made your selection, click “OK.” PST Viewer Pro will take the contents of the original MSG file and convert them to the PDF format based on your specifications.

You can check to make sure that the PDF conversion was successful by viewing the directory where you saved the file and opening it using a program like Adobe Reader. The converted PDF file can then be e-mailed in the form of an attachment to any recipient you choose. You can also backup the file to your hard drive or external USB flash drive for archival purposes as you deem necessary.

There are more tutorial for how to export eml files to pdf http://www.emlviewer.net/2012/08/eml-to-pdf.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文