none
Strange page break rules. RRS feed

  • Question

  • Hi ! I've encountered strange page break rules, namely when a page break does not break graphics - it remains on the same page, but effectively breaks the text that goes after the graphics in the text flow. So what are the actual page break rules for text/graphics/etc? My document carcas:

    <w:document> <w:body> <w:p> <w:r> <w:br w:type="page"/> -- this is the break </w:r> <w:r> <mc:AlternateContent> <mc:Choice Requires="wps"> <w:drawing> ....... here comes the drawing.......... </w:drawing> </mc:Choice> </mc:AlternateContent> </w:r> </w:p> <w:p> ----------- the last paragraph

    <w:r>
      <w:t>Some text that appears on the second page</w:t>
     </w:r>

    </w:p> <w:sectPr w:rsidR="00B646EB"> <w:pgSz w:w="11906" w:h="16838"/> <w:pgMar w:top="1134" w:right="850" w:bottom="1134" w:left="1701" w:header="708" w:footer="708" w:gutter="0"/> <w:cols w:space="708"/> <w:docGrid w:linePitch="360"/> </w:sectPr> </w:body> </w:document>


    Even if the break exists, the drawing appears on the first page! But if you enter some text before the drawing using <w:r><w:t> then the text and the drawing moves to the second page. Note - this paragraph should not be the last - see the remaining paragraph after this. 

    So why the page break does not work in this case for the drawing, but works for the text behind? What are the actual rules for page breaks?

    The problem file:

    https://drive.google.com/file/d/0BxCcB4V7CT9mZlFuZzAyZUFmaEk/edit?usp=sharing

    I'm using Microsoft Office Professional Plus 2010


    Thanks,

    Paul

    • Moved by Cindy Meister MVP Monday, May 19, 2014 10:34 AM WordOpenXML question, not related to the Word API
    Monday, May 19, 2014 9:55 AM

Answers

  • Hi Paul,

    The page break in your document is not ignored even when it is used with the drawing. The page break and the drawing are in the same paragraph; the anchor of the drawing is anchored in this paragraph so the drawing is displayed on this, in your sample file it is the first, page. When the run containing the drawing is replaced with a run containing regular text, not containing anchor, the page break in the first run pushes the second run to the second page. The behavior of Word corresponds to the above description.

    Thanks, Vilmos

    Saturday, June 14, 2014 4:41 AM
  • Hi Katerina,

    Your sample document, Doc_10.docx and Paul’s document, ”Not working page break.docx” have different characteristics; in Paul’s document the anchor is “page” relative, in your document the anchors are “column” and “paragraph” relative. Looking how Word 2013 displays your document and checking the corresponding xml parts, I can’t see problem. Please tell which part of your document is not rendered properly and I’ll be glad to investigate it.

    Thanks, Vilmos
    Friday, August 1, 2014 1:53 PM

All replies

  • Paul,

    Thank you for your question.  An engineer from the protocols team will contact you soon.


    Bryan S. Burgin Senior Escalation Engineer Microsoft Protocol Open Specifications Team

    Monday, May 19, 2014 5:52 PM
    Moderator
  • Hi Paul,

    I am the engineer who will be working with you on this issue. I've downloaded 'Not working page break.docx',  I am going to analyze it and will provide you with an update soon.

    Regards,
    Vilmos Foltenyi - MSFT


    Tuesday, May 20, 2014 4:10 PM
  • Hi Paul,

    The page break in your document is not ignored even when it is used with the drawing. The page break and the drawing are in the same paragraph; the anchor of the drawing is anchored in this paragraph so the drawing is displayed on this, in your sample file it is the first, page. When the run containing the drawing is replaced with a run containing regular text, not containing anchor, the page break in the first run pushes the second run to the second page. The behavior of Word corresponds to the above description.

    Thanks, Vilmos

    Saturday, June 14, 2014 4:41 AM
  • Hi Paul,

    Because there is no response to this issue since my last posting on Saturday, June 14, I assume my explanation was adequate, your problem is solved, you no longer require my assistance and I’ll mark my previous post as answer.

    Thanks, Vilmos

    Monday, June 23, 2014 9:55 PM
  • Hi Vilmos,

    I have also experienced this problem, but I cannot agree that the drawing is displayed on the first page because this picture and the page break are in the same paragraph. Please take a look at the following file:

    https://drive.google.com/file/d/0B1GcmxMwKQ-rb25XaDNndHRpcms/edit?usp=sharing

    It has only one paragraph and several page breaks. Anchored pictures before the first page break are placed on the first page, and pictures after the first break and before the second one are on the second page. They are placed on different pages although page breaks are in the same paragraph. 

    If the behavior that you mentioned were used, all pictures would be placed on the first page.

    Thanks, Katerina

    Monday, July 21, 2014 2:20 PM
  • Hi Katerina,

    Thank you for this inquiry. One of our team members will review this and follow-up.

    Thanks,

    Edgar

    Monday, July 21, 2014 4:57 PM
    Moderator
  • Hi Katerina,

    To access the file it needs a Google account. Please put the file in a public place or send it as attachment to 'dochelp (at) microsoft (dot) com' and  in the e-mail indicate that it is for me.

    Thanks, Vilmos

    Monday, July 21, 2014 6:36 PM
  • Vilmos,

    I've just sent it via email.

    Katerina

    Monday, July 21, 2014 6:45 PM
  • Hi Katerina,

    Thank you for sending the Doc10.docx file, I am going to analyze it and will provide you with an update soon.

    Thanks, Vilmos

    Monday, July 21, 2014 6:54 PM
  • Hi Katerina,

    Your sample document, Doc_10.docx and Paul’s document, ”Not working page break.docx” have different characteristics; in Paul’s document the anchor is “page” relative, in your document the anchors are “column” and “paragraph” relative. Looking how Word 2013 displays your document and checking the corresponding xml parts, I can’t see problem. Please tell which part of your document is not rendered properly and I’ll be glad to investigate it.

    Thanks, Vilmos
    Friday, August 1, 2014 1:53 PM
  • Hi Katerina,

    Because there is no response to this issue since my last posting on Friday, 8/1, I assume my explanation was adequate, your problem is solved, you no longer require my assistance and I’ll close the case.

    Thanks, Vilmos

    Wednesday, August 6, 2014 1:53 PM