private void applySpacingThreshold()
{
if (SharedData.PageSetup.GroupsPreferences == null) return;
var threshold = SharedData.PageSetup.GroupsPreferences.NewGroupAvailableSpacingThreshold;
if (threshold.ApproxEquals(0)) return;
var currentVerticalPosition = SharedData.PdfWriter.GetVerticalPosition(true);
if (currentVerticalPosition < threshold)
{
SharedData.PdfDoc.NewPage();
}
}