An application can call the HrGetPageBreaks method to obtain the number and location
of page breaks for documents that are paginated by the add-in.
C++
After the add-in paginates a document using the page height specified by the
HrSetPageHeightForPagination method, it returns the pagination information in
subsequent calls that the application makes to the HrGetPageBreaks method.
The rgdytfPageBreaks parameter is a pointer to an array of float values that specify the
locations of the page breaks in points. The first element in the array (index 0) is the
location of the first page break, the second element is the location of the second page
break, and so on. Therefore, the values of these elements are successively increasing.
The pcchPageBreaks parameter is a pointer to an integer value that specifies the number
of page breaks in the document.
The pfCanTrustLastBreakIsEndOfDocument parameter specifies whether the location of
the last page break is the end of the document or the beginning of the last page of the
document. A true value indicates that the last page break is the end of the document.
The application calls HrGetPageBreaks twice to obtain the pagination information. On
the first call, the application calls HrGetPageBreaks to obtain the number of page
breaks.
C++
The application then calls HrGetPageBreaks a second time to obtain the actual
locations. On the second call, the application passes a buffer of sufficient size to hold
the array of page-break locations.
C++
HRESULT HrGetPageBreaks(
    float* rgdytfPageBreaks,
    int* pcchPageBreaks,
    BOOL* pfCanTrustLastBreakIsEndOfDocument
);
HrGetPageBreaks(NULL, &nPageBreaks, NULL);
HrGetPageBreaks(rgPageBreaks, &nPageBreaks, fCanStopAtLastPageBreak);