Skip to content

Commit

Permalink
Added option to print multiple emails to separate PDFs and merge them…
Browse files Browse the repository at this point in the history
… using free PDFBox application.
  • Loading branch information
zigm committed Jun 6, 2022
1 parent 69427a2 commit b4329a8
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 19 deletions.
7 changes: 7 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
Changes
---

v 1.0.3.31

- To improve mboxview, please post reviews on what works, what doesn't, create bug tickets and enhancment requests;
- Script to merge PDF files doesn't work when MBox Viewer executable and configured data folder reside on different drives.;
- Page Break stopped working.;
- Updated User Manual to describe new and updated features.;

v 1.0.3.30

- To improve mboxview, please post reviews on what works, what doesn't, create bug tickets and enhancment requests;
Expand Down
8 changes: 8 additions & 0 deletions ReadMe.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ The LICENSE.txt file was added in v1.0.3.4 to make the licensing explicit and to

Changes
---

v 1.0.3.31

- To improve mboxview, please post reviews on what works, what doesn't, create bug tickets and enhancment requests;
- Script to merge PDF files doesn't work when MBox Viewer executable and configured data folder reside on different drives.;
- Page Break stopped working.;
- Updated User Manual to describe new and updated features.;

v 1.0.3.30

- To improve mboxview, please post reviews on what works, what doesn't, create bug tickets and enhancment requests;
Expand Down
Binary file modified UserGuide.odt
Binary file not shown.
Binary file modified UserGuide.pdf
Binary file not shown.
31 changes: 16 additions & 15 deletions src/MboxMail.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5032,9 +5032,6 @@ BOOL MboxMail::PageBreakNeeded(int mailPosition, int nextMailPosition, bool sing
if (pListView == 0)
return FALSE;

if ((abs(MboxMail::b_mails_which_sorted) != 99) && ((abs(MboxMail::b_mails_which_sorted) != 5) && (pListView->m_subjectSortType != 1)))
return FALSE;

if (pFrame->m_NamePatternParams.m_bPrintToSeparatePDFFiles == TRUE)
return FALSE;
else
Expand All @@ -5050,24 +5047,28 @@ BOOL MboxMail::PageBreakNeeded(int mailPosition, int nextMailPosition, bool sing
if (nextMailPosition >= s_mails.GetCount())
return FALSE;


BOOL addPageBreak = FALSE;
if (nextMailPosition < s_mails.GetCount())
if ((abs(MboxMail::b_mails_which_sorted) == 99) || ((abs(MboxMail::b_mails_which_sorted) == 4) && (pListView->m_subjectSortType == 1)))
{
MboxMail *m = s_mails[mailPosition];
MboxMail *m_next = s_mails[nextMailPosition];

if (abs(MboxMail::b_mails_which_sorted) == 99)
if (nextMailPosition < s_mails.GetCount())
{
if (m_next->m_groupId != m->m_groupId)
MboxMail *m = s_mails[mailPosition];
MboxMail *m_next = s_mails[nextMailPosition];

if (abs(MboxMail::b_mails_which_sorted) == 99)
{
addPageBreak = TRUE;
if (m_next->m_groupId != m->m_groupId)
{
addPageBreak = TRUE;
}
}
}
else if (abs(MboxMail::b_mails_which_sorted) == 4)
{
if (m_next->m_mail_index != m->m_mail_index)
else if (abs(MboxMail::b_mails_which_sorted) == 4)
{
addPageBreak = TRUE;
if (m_next->m_mail_index != m->m_mail_index)
{
addPageBreak = TRUE;
}
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/NListView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8726,7 +8726,7 @@ int NListView::MergePDfFileList(CFile &fp, CStringArray &in_array, CStringArray
return -1;
}

mergeScript = "@echo off\n\ncd ";
mergeScript = "@echo off\n\ncd /d ";
mergeScript.Append(targetPrintFolderPath);
mergeScript.Append("\n\n");

Expand Down Expand Up @@ -8779,7 +8779,7 @@ int NListView::MergePDfFileList(CFile &fp, CStringArray &in_array, CStringArray

mergeScript.Empty();

mergeScript = "@echo off\n\ncd ";
mergeScript = "@echo off\n\ncd /d ";
mergeScript.Append(targetPrintFolderPath);
mergeScript.Append("\n\n");

Expand Down
4 changes: 2 additions & 2 deletions src/mboxview.rc
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ END
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,3,30
FILEVERSION 1,0,3,31
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
Expand All @@ -771,7 +771,7 @@ BEGIN
BLOCK "040904b0"
BEGIN
VALUE "FileDescription", "Mbox Mail Archive Viewer MFC Application"
VALUE "FileVersion", "1.0.3.30"
VALUE "FileVersion", "1.0.3.31"
VALUE "InternalName", "mboxview"
VALUE "LegalCopyright", "Copyright (C) 2005"
VALUE "OriginalFilename", "mboxview.EXE"
Expand Down

0 comments on commit b4329a8

Please sign in to comment.