The macro processes the current odt-file. Let s = ThisComponent.Text.getString(). How to find the position of the next Page break in s? I tried pos = InStr(s, Chr(12)), but this doesn’t work.
Version: 25.2.7.2 (X86_64) / LibreOffice Community
Build ID: 5cbfd1ab6520636bb5f7b99185aa69bd7456825d
CPU threads: 8; OS: Windows 11 X86_64 (10.0 build 26200); UI render: Skia/Raster; VCL: win
Locale: fr-FR (en_US); UI: en-US
Calc: threaded
not so simple 
see LibreOffice Developer's Guide: Chapter 7 - Text Documents - The Document Foundation Wiki #Control_Characters
→ LibreOffice: com::sun::star::style Module Reference
or also ;