Does this work for you?
Sub test()
Dim lr As Long
Dim i As Integer, r As Integer
On Error Resume Next
lr = Cells.Find(What:="*", After:=Cells(1, 1), LookIn:=xlValues, SearchOrder:=xlByRows, SearchDirection:=xlPrevious, SearchFormat:=False).Row
On Error GoTo 0
If lr > 0 Then
r = -1
ActiveSheet.ResetAllPageBreaks
For Each Cell In Range("A1:A" & lr).SpecialCells(xlCellTypeVisible)
r = r + 1
If r = 63 Then
i = 1
r = -1
ActiveSheet.HPageBreaks.Add before:=Cell
ElseIf i = 1 And r = 49 Then
r = -1
ActiveSheet.HPageBreaks.Add before:=Cell
End If
DoEvents
Next
End If
End Sub
Bookmarks