diff --git a/include/wx/html/htmprint.h b/include/wx/html/htmprint.h
index 2efafaf29f..a455dec747 100644
--- a/include/wx/html/htmprint.h
+++ b/include/wx/html/htmprint.h
@@ -65,7 +65,7 @@ public:
// Finds the next page break after the specified (vertical) position.
// Returns wxNOT_FOUND if passed in position is the last page break.
- int FindNextPageBreak(int pos);
+ int FindNextPageBreak(int pos) const;
// [x,y] is position of upper-left corner of printing rectangle (see SetSize)
// from is y-coordinate of the very first visible cell
diff --git a/src/html/htmprint.cpp b/src/html/htmprint.cpp
index d7d3e7059a..3b03b2e67c 100644
--- a/src/html/htmprint.cpp
+++ b/src/html/htmprint.cpp
@@ -140,7 +140,7 @@ void wxHtmlDCRenderer::SetStandardFonts(int size,
// else: SetHtmlText() not yet called, no need for relayout
}
-int wxHtmlDCRenderer::FindNextPageBreak(int pos)
+int wxHtmlDCRenderer::FindNextPageBreak(int pos) const
{
// Stop looking for page breaks if the previous one was already at the end
// of the last page.