Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add message about printer settings to PDF failure box #3854

Open
wants to merge 1 commit into
base: Version4.8
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,14 @@ public void MakePdf(string inputHtmlPath, string outputPdfPath, string paperSize

// This message string is intentionally separate because it was added after the previous string had already been localized in most languages.
var msg2 = L10NSharp.LocalizationManager.GetDynamicString(@"Bloom", @"MakePDF.TrySinglePage",
"The book's images might have exceeded the amount of RAM memory available. Please turn on the \"Use Less Memory\" option which is slower but uses less memory.",
"Possibility: The book's images might have exceeded the amount of RAM memory available. Please turn on the \"Use Less Memory\" option which is slower but uses less memory.",
@"Error message displayed in a message dialog box");
// This message string is intentionally separate because it was added after the previous string had already been localized in most languages.
var msg3 = L10NSharp.LocalizationManager.GetDynamicString(@"Bloom", @"MakePDF.CheckPrinterSettings",
"Possibility: You computer does not have a valid printer chosen. Check your computer's printer settings. Yes, this can be the cause even though you were not trying to print.",
@"Error message displayed in a message dialog box");

var fullMsg = String.Format(msg, outputPdfPath, Environment.NewLine) + Environment.NewLine + msg2 + Environment.NewLine + res.StandardOutput;
var fullMsg = String.Format(msg, outputPdfPath, Environment.NewLine) + Environment.NewLine + msg2 + Environment.NewLine + msg3 + Environment.NewLine + res.StandardOutput;

var except = new ApplicationException(fullMsg);
// Note that if we're being run by a BackgroundWorker, it will catch the exception.
Expand Down