0% found this document useful (0 votes)
29 views5 pages

Mboxviewer Help

The document provides help and overview information for printing emails from an MBOX file to various file formats like CSV, text, HTML, and PDF using Mbox Viewer software. It discusses the limitations and options for printing emails to single or multiple files and describes different methods and tools that can be used.

Uploaded by

Marko Lazarevic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views5 pages

Mboxviewer Help

The document provides help and overview information for printing emails from an MBOX file to various file formats like CSV, text, HTML, and PDF using Mbox Viewer software. It discusses the limitations and options for printing emails to single or multiple files and describes different methods and tools that can be used.

Uploaded by

Marko Lazarevic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

1 Mbox Viewer Help

Please review first the User Guide provided with the package and/or right/left single and double click on any item within the
Mbox Viewer window and try all presented options.

To get started, please install the mbox mail archive in the local folder, install and left double-click on the mboxview
executable and then select File->Select Folder menu option to open that folder.

2 Mail Printing Overview


Mbox Viewer supports direct printing of all, single or multiple mails to CSV, Text, HTML, PDF files and to PDF printer.

Mails can also be printed to PDF from any Web Browser by opening mails printed to HTML files.

By default all, single or multiple mails are printed to single CSV, Text, HTML and PDF files without any additional
configuration or manual steps.

However there is a limit how many mails can effectively be printed to a single file.

The next sections will cover these limitations and alternate solutions.

2.1 Mail Printing to CSV Spreasheet file


Mbox Viewer supports printing of all mails or selected group of mails to single CSV file using "Print Selected Mails To →
CSV" option on the selected mails.

All mails can be printed to single CSV file but a particular Spreadsheet tool may limit the maximum supported size of the
spreadsheet file. User can select and print groups of mails to separate CVS files as a work around.

2.2 Mail Printing to TEXT file


Mbox Viewer supports printing of all mail, single or selected group of mails to single Text file using "Print Selected Mails
To → Text" option on the selected mails.

All mails can be printed to single TEXT file but a particular Text viewer tool may limit the maximum supported size of the
text file. User can select and print groups of mails to separate Text files as a work around.

User can apply following options to printing via "File -> Print Config":

1. Insert Page Break after each mail or after mail conversation thread.

Note that the raw mail message typically contains the user message in both the plain text and HTML text formats. If the
plain text is present, it will be used otherwise text will be extracted from the HTML text. User mail client application is
responsible to assure that both text parts, if present, are semantically equivalent.

2.3 Mail Printing to HTML file


Mbox Viewer supports printing of all mails, single or selected group of mails to single HTML file or to separate per mail
HTML file using "Print Selected Mails To → HTML" option on the selected mails.

All archive mails can be printed to single HTML file but HTML viewer tools/Web Browsers may not be able to process
generated large HTML files, become very slow or completely overloaded. User can select and print groups of mails to
separate HTML files as a work around.

There is no hard rule how many mails can be printed to a single HTML file and viewed by a Web Browser. It depends on
the size and content (such as heavy graphics and number of hyperlinks) of mails. It should be doable to print up to a couple
of hundreds small to medium size text mails to a single HTML file.

Mails can be printed to a separate per mail HTML file for further processing as described in Mail Printing to PDF section.

2.4 Mail Printing to Printer


Mbox Viewer supports printing of all mails, single or selected group of mails to Printer and to PDF Printer in particular
using "Print Selected Mails To--> Printer" option on the selected mails.

Printing to PDF printer relies on Microsoft HTML Document object to print its content.

First, Mbox Viewer will print mails to a single HTML file, then it will load the file into HTML Document object and
request the document object to print its content.

The limitations as far as the maximum number of mails that can be printed are described in the "Printing Mails to HTML
file" section above.

The "File -> Print Config -> Page Setup" dialog option allows users to control the page title, header, footer and background
color. User can also enable "File -> Print Config -> Print Preview" option to open Page Setup before each mail print.

By default user is prompted to select PDF printer for printing mails to PDF file.

If the PDF printer is configured as the default printer, user can set "File -> Print Config -> Do Not Prompt" dialog option to
skip the printer prompt.

2.5 Mail Printing to PDF files


Mbox Viewer supports multiple ways to print all, single or multiple mails to PDF files using "Print Selected Mails To--
>PDF" option on the selected mails.

By Default all, single or selected mails are printed to a single HTML file and then converted to PDF format.

The Default method limits the number of mails that can be effectively printed to single HTML file as noted in previous
sections.

More scalable method is described in "Mail Printing to PDF files by Power Users" section.

2.6 Mail Printing to PDF files by leveraging Chrome or Edge


browser
Mbox Viewer supports an option to print mails directly to PDF file without any user interaction.

Direct printing to PDF file invokes external application to convert HTML files to PDF.
User can apply following options to printing:

1. Insert Page Break after each mail or after mail conversation thread.
2. Enable printing the default (hard coded by browser) header and footer. However, the default header and footer may
not meet user requirements.
3. Enable/disable mail header background color.

By default the standard Microsoft Edge browser in so called headless mode is invoked to perform conversion. User can
configure Google Chrome browser instead of Microsoft Edge. Both browsers have the same capabilities.

2.7 Mail Printing to PDF files from Chrome or Edge browser


User has an option to print one or more mails to HTML file, open the generated file in a browser and
print to PDF file from the browser. The approach enables users to apply more settings for printing such
as “print as black and white”.

2.8 Mail Printing to PDF files using wkhtmltopdf


Option is provided to leverage free wkhtmltopdf application to covert HTML to PDF.

Option to leverage the wkhtmltopdf is provided since the standard Chrome and Edge browsers in the headless mode don't
support options to control the page title, header and footer and the background color.

User can set "File -> Print Config -> Path To User Defined Script" to invoke HTML2PDF-single-wkhtmltopdf.cmd script
included in the release package.

HTML2PDF-single-wkhtmltopdf.cmd script creates PDF files with the right footer "Page Number of Total Pages" and no
page Title and Header.

The wkhtmltopdf can be downloaded from wkhtmltopdf.org downloads.

The wkhtmltopdf command line options are documented in wkhtmltopdf.org usage.

User can replicate HTML2PDF-single-wkhtmltopdf.cmd to new file and customize to leverage different HTML to PDF
converter possibly commercial.

User will need to update "Path To User Defined Script" in "File -> Print Config" dialog to point to new script path.

User can apply following options to printing via "File -> Print Config":

1. Insert Page Break after each mail or after mail conversation thread.
2. Enable/disable mail header background color.

2.9 Mail Printing to PDF files using Merge option


MBox Viewer concatenates headers and content of all mails into a single HTML file and requests Edge or Chrome Web
Browser to convert HTML file into PDF. MBox Viewer's default solution is non-standard and in rare cases can affect font
sizes and possibly other formatting in all mails. If the generated PDF file didn’t meet expectation, please consider running
“Merge” option.

Users may print selected mails to a single PDF file by selecting "Print Selected Mails To → PDF -> Merge" option on the
selected mails.
MBox Viewer will print selected mails to separate PDF files and leverage free PDFBox java tool to merge all PDF files into
a single PDF file.

MBox Viewer will create HTML_GROUP sub-folder to process Merge request. For example: F:\DataFolder2\
MBoxViewer\F\MBOX\apache-mbox\PrintCache\PDF_GROUP

MBox Viewer will generate all PDF files in that directory, create several help files, scripts and log files.

Printing large number of mails to separate PDF files is time consuming. Depending on the size and content (primarily
hyperlinks) of a mail, it may take fraction of a second to create single PDF file or a tens of seconds.

Created script invoke free PDFBox java tool to merge PDF files.

Free PDFBox java tool can be downloaded from pdfbox.apache.org. The PDFBox command line java tool, such as pdfbox-
app-3.0.0-alpha3.jar, must be placed in the same directory as MBox Viewer binary file.

PDFBox command line tools usage example pdfbox.apache.org commandline tools.

Java 8 can be downloaded from jdk8-downloads jdk8-downloads.

3 Advanced Find Overview


Advanced Find dialog allows users to use multiple fields to compose more
complex search criteria.

The search logic is hard-coded for the most common case and is as follow:

(unidirectional or bidirectional From and To) and Subject and CC and BCC and (Message or Attachments)

The search criteria is basically ANDing all checked fields or pairs of fields such as (From and To) and (Message and
Attachment). Not checked fields are ignored.

Find Advanced dialog allows users to specify relation between From and To as bidirectional or unidirectional and the result
is ANDed with other
checked fields.

The Message and Attachment are handled as OR expression and the result is ANDed with other checked fields.

More complex search criteria can be accomplished by leveraging User Selected Mails list. User can run Advanced Find
multiple times and merge results into User Selected Mails list.

4 Data Directory Structure


MBox Viewer creates data directory configured by a user and uses it as target directory for files and sub-folders created by
Mbox Viewer such as "Print..." or Export All Mails as eml files, etc

User configures the data directory by running "File-->Data Folder Config" dialog.

MBox Viewer creates folder directory and sub-directory per each mail archive file as follow:

Assuming MboxFilePath = F:\Account\Inbox.mbox

DIRECTORY will be created as follow:


DIRECTORY=UserSelectedDataFolder\MBoxViewer\F\Account\Inbox-mbox

The “.mbox” extension, if present, will be mapped to "-mbox"

MBox Viewer will create the following directories when needed:


DIRECTORY - target directory for mbox mail index files, help Html files and various sub-directories
DIRECTORY\Inbox.mbox
DIRECTORY\Inbox.mbox.mboxview
DIRECTORY\Inbox-mbox\ImageCache - target directory for image files, such as png,jpg,etc, embedded into mails
DIRECTORY\Inbox-mbox\AttachmentCache - target directory for attachment files
DIRECTORY\Inbox-mbox\EmlCache - target directory for Eml files
DIRECTORY\Inbox-mbox\ArchiveCache - target directory for saving Found Mails and User Selected Mails to mbox and mboxlist files
DIRECTORY\Inbox-mbox\PrintCache - target directory for printing to single CSV,TEXT,HTML and PDF files
DIRECTORY\Inbox-mbox\PrintCache\PDF_GROUP - target directory for printing to separate PDF files
DIRECTORY\Inbox-mbox\PrintCache\PDF_GROUP\PDF_MERGE – target directory for merged PDF files
DIRECTORY\Inbox-mbox\PrintCache\PDF_GROUP\PDF_MERGE\PDF_MERGE - target directory for merged PDF files if multiple merge steps are needed
DIRECTORY\Inbox-mbox\PrintCache\HTML_GROUP - target directory for printing to separate HTML files
DIRECTORY\Inbox-mbox\PrintCache\HTML_GROUP\PDF_MERGE – target directory for merged PDF files
DIRECTORY\Inbox-mbox\PrintCache\HTML_GROUP\PDF_MERGE\PDF_MERGE - target directory for merged PDF files if multiple merge steps are needed
DIRECTORY\PrintCache\MailArchiveFile2
DIRECTORY\LabelCache - target directory for Label files and sub-folders
DIRECTORY\MergeCache - target directory for intermediate file created when “File-->Select root folder for merging” is selected

Mbox Viewer also creates and manages temporary directory

C:\Users\UserName\AppData\Local\Temp\MboxViewer

to store temporary files (attachments, eml and htm) created when a single mail is selected by the user.

Mbox Viewer created help files such as MailListsInfo.htm and MboxviewerHelp.htm are stored in the temporary directory

C:\Users\UserName\AppData\Local\Temp\mboxview\MboxHelp.

You might also like