Answers.Body: <p>I don't use calibre to produce ebooks, but you should be looking at the css file. My guess is that p.block_7 has some code to force a page break.  You can probably fix the problem in two ways -- by removing the blank p tag  with the corresponding css or changing the css file itself. Here's code from my recent css file to see what live code looks like. </p>
  
  <pre><code>  p.centeredpagebreak {
       text-align: center;
       font-size: 1.2em;
       page-break-before: always;
       }
  </code></pre>
  
  <p><a href="https://www.w3schools.com/csSref/pr_print_pagebb.asp" rel="nofollow noreferrer">MORE about CSS</a> </p>
  
  <p>As you can guess there are also options to do page-break-after and to specify "never" instead of always. By the way, support for this css declaration is flaky; it varies on which reading system you're testing on. IIRC, Google Play Books doesn't support that.. Depending on the device and the context, sometimes Even Kindle doesn't always render it properly.</p>
  
  <p><strong>Answer 2</strong>: Like I said, I don't use MS Word/Calibre to format ebooks. But my guess is that if you use the HEADING style for each chapter, you don't need to include a page break in the MS Word file; Calibre will just assume that for every section with a HEADING style, it should insert a page break. Try this suggestion first before trying to mess with the css. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-06T17:27:31.920Z
Answers.Text: Calibre is a powerful program and can do lots of things, but it sets reasonable defaults which often must be overridden. Removing the page break will probably fix your problem.
Answers.UserDisplayName: idiotprogrammer
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-06T17:23:39.773Z
Answers.LastActivityDate: 2019-04-06T17:23:39.773Z
Answers.UserDisplayName: idiotprogrammer
Answers.Body: <blockquote>
    <p>I had removed it from the Word document, but apparently failed to successfully replace the book in calibre's book library.</p>
  </blockquote>
  
  <p>A subtle but important point you made. Be careful when editing source documents that you have converted to ebooks with Calibre. You might think when you go to re-convert after making and saving the edit, Calibre will recognize the updated file version and convert that. Not so in my experience. It's either caching the old version (but I can't find that anywhere if so), or it is reading the metadata of the Word file, which hasn't materially changed, so it says, 'oh, must be the same file as before, just keep it as is.'</p>
  
  <p>Best bet is to delete the book altogether from your Calibre library, then after making the edits in Word, drop the Word doc back into Calibre and convert again. Obviously, it's much faster just to make the change in the epub directly.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-13T04:00:11.387Z
Answers.LastActivityDate: 2019-04-13T04:00:11.387Z
Answers.UserDisplayName: b_q
Answers.Body: <p>The other responses address how to tackle this within the EPUB file, so I'll focus only on Word. What you show in Word will absolutely cause the problem you experienced. You should NEVER use a manual page break at the end of a chapter or you guarantee that some users (as you describe -- depending on screen size) will get a blank page. To avoid this, don't add manual page breaks. Instead, use a Heading style for the start of each chapter and in the Style -&gt; Paragraph Formatting -&gt; and set Page break before. Specifically:</p>
  <ol>
  <li><p>Right click on the Heading Style you are using for your chapter title in the Styles section on the Home tab of the Ribbon bar</p>
  <p><a href="https://i.sstatic.net/pkTMjfgP.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/pkTMjfgP.png" alt="Modify style" /></a></p>
  </li>
  <li><p>Select &quot;Modify…&quot;</p>
  </li>
  <li><p>In the Modify Style window that opens, click on &quot;Format&quot; in the lower left corner and choose &quot;Paragraph…&quot;</p>
  <p><a href="https://i.sstatic.net/Hlt0gHQO.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Hlt0gHQO.png" alt="Select Paragraph..." /></a></p>
  </li>
  <li><p>Go to the &quot;Line and Page Breaks&quot; tab and check the box for &quot;Page break before&quot;</p>
  </li>
  </ol>
  <p><a href="https://i.sstatic.net/oJS5dRwA.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/oJS5dRwA.png" alt="Check Page break before" /></a></p>
  <p>You may also wish to go to Scribl.com that provides a Word template with all of these styles already properly defined for EPUB conversion via Calibre (Word DOCX -&gt; EPUB via Calibre is Scribl's recommended and best supported method).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-10-09T14:12:18.850Z
Answers.LastActivityDate: 2024-10-09T14:12:18.850Z
Answers.UserDisplayName: GraniteStateColin
Body: <p>I'm completely new to calibre and e-book creation in general. I've converted a large .docx file to ePub format. When I browse the result with the calibre e-book viewer there is sometimes a "blank page" between the end of one chapter and the start of the next chapter, i.e., I have to press PageDown twice instead of once to get to the next chapter. This worries me; I'm thinking the customer will consider this to be a formatting error, and result in negative feedback.</p>
  
  <p>The location of these extraneous "blank pages" depends on the size of the viewer window, which makes it difficult to debug the situation.</p>
  
  <p>In my Word document I end each chapter with a page break, so the end of a chapter may look like this:</p>
  
  <p><a href="https://i.sstatic.net/tTVuF.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/tTVuF.png" alt="enter image description here"></a></p>
  
  <p>When I look in the ePub file with calibre's file editor, I see this:</p>
  
  <pre><code>    &lt;p class="block_6"&gt;When the barman arrived Piotr waved him away. “I have changed my mind, it is time for me to go.”&lt;/p&gt;
      &lt;p class="block_6"&gt;Paul said, “Let us drive you home.” He got his wallet out and gave Piotr $200. When Henriette reached for her backpack Paul said to her, “No, no, expense account, remember?”&lt;/p&gt;
      &lt;p class="block_7" id="calibre_pb_14"&gt; &lt;/p&gt;
  &lt;/body&gt;&lt;/html&gt;
  </code></pre>
  
  <p>Now, if I delete the second-last line, the one with id="calibre_pb_14", this seems to "fix" the problem of there sometimes (depending on the viewer window size) being an extra "blank page" between this chapter and the next one.</p>
  
  <p>But maybe that second-last line is needed for some functionality? Or maybe I'm doing something stupid somewhere? Can this problem be fixed, or should I ignore it?</p>
  
  <p>EDIT</p>
  
  <p>Sorry, but I've come to the conclusion that my question is in error. That second-last line represents an actual blank line in the .docx file. I had removed it from the Word document, but apparently failed to successfully replace the book in calibre's book library.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-04-06T17:15:39.973Z
Comments.Text: Which reading system are you testing this on?
Comments.UserDisplayName: idiotprogrammer
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-04-06T17:25:57.563Z
Comments.Text: @idiotprogrammer So far I'm only using calibre's own viewer program.
Comments.UserDisplayName: RenniePet
Tags: <epub><calibre>
Title: Occasional blank pages in ePub produced by calibre from Word document
UserDisplayName: RenniePet
ThreadText: # Occasional blank pages in ePub produced by calibre from Word document
  
  (Asked by: username_0 on 2019-04-06)
  
  I'm completely new to calibre and e-book creation in general. I've converted a large .docx file to ePub format. When I browse the result with the calibre e-book viewer there is sometimes a "blank page" between the end of one chapter and the start of the next chapter, i.e., I have to press PageDown twice instead of once to get to the next chapter. This worries me; I'm thinking the customer will consider this to be a formatting error, and result in negative feedback.
  
  The location of these extraneous "blank pages" depends on the size of the viewer window, which makes it difficult to debug the situation.
  
  In my Word document I end each chapter with a page break, so the end of a chapter may look like this:
  
  [![enter image description here](https://i.sstatic.net/tTVuF.png)](https://i.sstatic.net/tTVuF.png)
  
  When I look in the ePub file with calibre's file editor, I see this:
  
  ```
      <p class="block_6">When the barman arrived Piotr waved him away. “I have changed my mind, it is time for me to go.”</p>
      <p class="block_6">Paul said, “Let us drive you home.” He got his wallet out and gave Piotr $200. When Henriette reached for her backpack Paul said to her, “No, no, expense account, remember?”</p>
      <p class="block_7" id="calibre_pb_14"> </p>
  </body></html>
  
  ```
  
  Now, if I delete the second-last line, the one with id="calibre\_pb\_14", this seems to "fix" the problem of there sometimes (depending on the viewer window size) being an extra "blank page" between this chapter and the next one.
  
  But maybe that second-last line is needed for some functionality? Or maybe I'm doing something stupid somewhere? Can this problem be fixed, or should I ignore it?
  
  EDIT
  
  Sorry, but I've come to the conclusion that my question is in error. That second-last line represents an actual blank line in the .docx file. I had removed it from the Word document, but apparently failed to successfully replace the book in calibre's book library.
  
  **Tags:** epub, calibre
  
  > **Comments:**
  > **username_1**: Which reading system are you testing this on?  
  > **username_0**: @username_1 So far I'm only using calibre's own viewer program.  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2019-04-06. Score: 0
  
  I don't use calibre to produce ebooks, but you should be looking at the css file. My guess is that p.block\_7 has some code to force a page break. You can probably fix the problem in two ways -- by removing the blank p tag with the corresponding css or changing the css file itself. Here's code from my recent css file to see what live code looks like.
  
  ```
    p.centeredpagebreak {
       text-align: center;
       font-size: 1.2em;
       page-break-before: always;
       }
  
  ```
  
  [MORE about CSS](https://www.w3schools.com/csSref/pr_print_pagebb.asp)
  
  As you can guess there are also options to do page-break-after and to specify "never" instead of always. By the way, support for this css declaration is flaky; it varies on which reading system you're testing on. IIRC, Google Play Books doesn't support that.. Depending on the device and the context, sometimes Even Kindle doesn't always render it properly.
  
  **Answer 2**: Like I said, I don't use MS Word/Calibre to format ebooks. But my guess is that if you use the HEADING style for each chapter, you don't need to include a page break in the MS Word file; Calibre will just assume that for every section with a HEADING style, it should insert a page break. Try this suggestion first before trying to mess with the css.
  
  > **Comments:**
  > **username_1**: Calibre is a powerful program and can do lots of things, but it sets reasonable defaults which often must be overridden. Removing the page break will probably fix your problem.  
  
  ---
  
  ### Answer by username_2 on 2019-04-13. Score: 0
  
  > I had removed it from the Word document, but apparently failed to successfully replace the book in calibre's book library.
  
  A subtle but important point you made. Be careful when editing source documents that you have converted to ebooks with Calibre. You might think when you go to re-convert after making and saving the edit, Calibre will recognize the updated file version and convert that. Not so in my experience. It's either caching the old version (but I can't find that anywhere if so), or it is reading the metadata of the Word file, which hasn't materially changed, so it says, 'oh, must be the same file as before, just keep it as is.'
  
  Best bet is to delete the book altogether from your Calibre library, then after making the edits in Word, drop the Word doc back into Calibre and convert again. Obviously, it's much faster just to make the change in the epub directly.
  
  
  ---
  
  ### Answer by username_3 on 2024-10-09. Score: 0
  
  The other responses address how to tackle this within the EPUB file, so I'll focus only on Word. What you show in Word will absolutely cause the problem you experienced. You should NEVER use a manual page break at the end of a chapter or you guarantee that some users (as you describe -- depending on screen size) will get a blank page. To avoid this, don't add manual page breaks. Instead, use a Heading style for the start of each chapter and in the Style -> Paragraph Formatting -> and set Page break before. Specifically:
  
  1. Right click on the Heading Style you are using for your chapter title in the Styles section on the Home tab of the Ribbon bar
  
     [![Modify style](https://i.sstatic.net/pkTMjfgP.png)](https://i.sstatic.net/pkTMjfgP.png)
  2. Select "Modify…"
  3. In the Modify Style window that opens, click on "Format" in the lower left corner and choose "Paragraph…"
  
     [![Select Paragraph...](https://i.sstatic.net/Hlt0gHQO.png)](https://i.sstatic.net/Hlt0gHQO.png)
  4. Go to the "Line and Page Breaks" tab and check the box for "Page break before"
  
  [![Check Page break before](https://i.sstatic.net/oJS5dRwA.png)](https://i.sstatic.net/oJS5dRwA.png)
  
  You may also wish to go to Scribl.com that provides a Word template with all of these styles already properly defined for EPUB conversion via Calibre (Word DOCX -> EPUB via Calibre is Scribl's recommended and best supported method).
  
  
  ---
  
  