diff --git a/src/r_tests/java/w2phtml/regressionTests/html5/SplitFilesAlignToPages.java b/src/r_tests/java/w2phtml/regressionTests/html5/SplitFilesAlignToPages.java
new file mode 100644
index 0000000..ed6282d
--- /dev/null
+++ b/src/r_tests/java/w2phtml/regressionTests/html5/SplitFilesAlignToPages.java
@@ -0,0 +1,35 @@
+package w2phtml.regressionTests.html5;
+
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.io.FileUtils;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.Test;
+
+public class SplitFilesAlignToPages {
+  @Test
+  @DisplayName("Split files align to pages")
+  void testExample() throws Exception {
+    String testName = "split_files";
+    List<String> arguments = new ArrayList<String>();
+    arguments.add("-page_break_style");
+    arguments.add("height:3em;margin-top:1em;margin-bottom:1em;background-color:red;");
+    arguments.add("-split_level=1");
+    arguments.add("-align_splits_to_pages=true");
+    arguments.add("-html5");
+    arguments.add("./testdocuments/input/" + testName + ".odt");
+    arguments.add("./testdocuments/output/" + testName + ".html");
+    w2phtml.Application.main(arguments.toArray(new String[0]));
+    File result1 = new File("./testdocuments/output/" + testName + ".html");
+    File result2 = new File("./testdocuments/output/" + testName + "1.html");
+    File model1 = new File("./testdocuments/model/" + testName + ".html");
+    File model2 = new File("./testdocuments/model/" + testName + "1.html");
+    assertTrue(FileUtils.contentEquals(result1, model1), "The files differ!");
+    assertTrue(FileUtils.contentEquals(result2, model2), "The files differ!");
+
+  }
+}
diff --git a/testdocuments/input/split_files.odt b/testdocuments/input/split_files.odt
new file mode 100644
index 0000000..3a2e9e8
Binary files /dev/null and b/testdocuments/input/split_files.odt differ
diff --git a/testdocuments/model/split_files.html b/testdocuments/model/split_files.html
new file mode 100644
index 0000000..dfcb142
--- /dev/null
+++ b/testdocuments/model/split_files.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html lang="ru-RU" xml:lang="ru-RU" xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>Default</title>
+    <meta charset="UTF-8" />
+    <style media="all" type="text/css">
+      body {margin-left:auto;max-width:800px;font-size:1.0rem;font-family:'IPH Lib Serif';margin-right:auto;}
+    </style>
+  </head>
+  <body dir="ltr">
+    <div class="pageNum" page="1">
+      <div class="pageContainer" style="column-count: 1;">
+        <h1 id="toc0" style="margin-left:0;border:none;padding:0;font-weight:bold;clear:left;font-size:1.5166668rem;margin-top:0.9992126rem;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.5007874rem;margin-right:0;text-align:center;">Heading 1</h1>
+        <p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:1.0rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.58346456rem;margin-right:0;">Text 1</p>
+        <h2 id="toc1" style="margin-left:0;border:none;padding:0;font-weight:bold;clear:left;font-size:1.1666667rem;margin-top:0.8338583rem;font-family:&apos;IPH Lib Serif&apos;;margin-bottom:0.5007874rem;margin-right:0;text-align:center;">Heading 2</h2>
+        <p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:1.0rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.58346456rem;margin-right:0;">text2</p>
+        <h3 id="toc2" style="margin-left:0;border:none;padding:0;font-weight:bold;clear:left;font-size:1.0rem;margin-top:0.58346456rem;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.5007874rem;margin-right:0;text-align:center;">Heading 3</h3>
+        <p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:1.0rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.58346456rem;margin-right:0;">Text 3</p>
+      </div>
+    </div>
+  </body>
+</html>
diff --git a/testdocuments/model/split_files1.html b/testdocuments/model/split_files1.html
new file mode 100644
index 0000000..480b38f
--- /dev/null
+++ b/testdocuments/model/split_files1.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html lang="ru-RU" xml:lang="ru-RU" xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>Default</title>
+    <meta charset="UTF-8" />
+    <style media="all" type="text/css">
+      body {margin-left:auto;max-width:800px;font-size:1.0rem;font-family:'IPH Lib Serif';margin-right:auto;}
+    </style>
+  </head>
+  <body dir="ltr">
+    <div class="pageBreak" style="height:3em;margin-top:1em;margin-bottom:1em;background-color:red;"> </div>
+    <div class="pageNum" page="2">
+      <div class="pageContainer" style="column-count: 1;">
+        <h1 id="toc3" style="margin-left:0;border:none;padding:0;font-weight:bold;clear:left;font-size:1.5166668rem;margin-top:0.9992126rem;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.5007874rem;margin-right:0;text-align:center;">Heading 1</h1>
+        <p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:1.0rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.58346456rem;margin-right:0;">Text 4</p>
+        <h3 id="toc4" style="margin-left:0;border:none;padding:0;font-weight:bold;clear:left;font-size:1.0rem;margin-top:0.58346456rem;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.5007874rem;margin-right:0;text-align:center;">Heading 3</h3>
+        <p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:1.0rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.58346456rem;margin-right:0;">Text 5</p>
+        <h1 id="toc5" style="margin-left:0;border:none;padding:0;font-weight:bold;clear:left;font-size:1.5166668rem;margin-top:0.9992126rem;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.5007874rem;margin-right:0;text-align:center;">Heading 1</h1>
+      </div>
+    </div>
+  </body>
+</html>