<!DOCTYPE html>
<html>
<head>
    <style>
        @page {
            margin: 30px 20px 50px 20px;
        }

        body {
            font-family: DejaVu Sans, sans-serif;
            font-size: 12px;
            margin: 0;
            padding-bottom: 50px;
        }
    </style>
</head>
<body>

    <h2>Test Page Numberddd</h2>
    {{ isset($pdf) ? 'PDF set ' : 'PDF not set' }}
    @for ($i = 0; $i < 100; $i++)
        <p>Line {{ $i }}</p>
    @endfor

    @if (isset($pdf))
       <script type="text/php">
            if (isset($pdf)) {
                {{-- $font = $fontMetrics->get_font("Helvetica", "normal"); --}}
                $pdf->page_script('
                    $font = $fontMetrics->get_font("Helvetica", "normal");
$pdf->text(30, 790, "Page $PAGE_NUM of $PAGE_COUNT", $font, 10);
                ');
            }
        </script>
    @endif

</body>
</html>
