Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
faisal-fawad committed Sep 6, 2023
1 parent 3857a22 commit ba8eaf6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PrintNoteAddin/AddIn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public void AddInButtonClicked(IRibbonControl control)
// OneNote scales content to paper width using a ratio, which can be used to obtain the new height before printing
float ratio = (paperWidth + (float)12.7 /* .5in for safety */) / mmWidth;
if (ratio > 1.4) { ratio = (float)1.4; /* Upper limit for ratio */ }
else if (ratio < 0.8) { ratio += (ratio / 8); /* Small ratios need a readjustment to fit the page */ }
else if (ratio < 1) { ratio += (ratio / 8); /* Small ratios need a readjustment to fit the page */ }
mmHeight *= ratio;

// Adds a custom paper size named PrintNote - needs administrative permissions
Expand Down

0 comments on commit ba8eaf6

Please sign in to comment.