This library calculates length of Quran Clip (Makta') (مقطع) the pages from point (ayah, surah) to another.
composer require osamz/quran-safahat
$startAya = $helper->getCheckedAyaPoint("النازعات", 17);
$endAya = $helper->getCheckedAyaPoint("المرسلات", 50);
$clip = new QuranClip($startAya, $endAya);
$quran = new QuranNaskhEdition($quranData);
$quranCalculator = new QuranCalculator($quran);
$clipSize = $quranCalculator->calculate($clip);
echo "Pages: $clipSize->pages, and $clipSize->lines lines.";
// Pages: 4, and 1 lines.
see: examples folder for detailed example.