Hi,
I have a document with content wrapped inside a content annotation.
Within the content, i inserted a section break. Upon insertion, i noticed the following:
In my code I have RadDocument, and converted each contents within the annotation selection to small radDocument objects.
var fragment = selection.CopySelectedDocumentElements(false);
//convert fragment to radDocument then copy the style of the first p
var fragmentDocument = templateRadDocument.CreateDeepCopy() as RadDocument;
convert the fragmentDocument to OpenXML
In the converted RadDocument, it doesnt seem to preserve the correct page orientation for the last section.
<?xml version="1.0" encoding="utf-8" ?>
- <w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
- <w:body>
- <w:p>
- <w:pPr>
<w:rPr />
- <w:sectPr>
<w:type w:val="nextPage" />
<w:pgSz w:w="15840" w:h="12240" w:orient="landscape" />
<w:pgMar w:bottom="1425" w:top="1425" w:right="1425" w:left="1425" />
</w:sectPr>
</w:pPr>
- <w:r>
<w:rPr />
<w:t xml:space="preserve">Content on before section break</w:t>
</w:r>
</w:p>
- <w:p>
- <w:pPr>
<w:rPr />
</w:pPr>
- <w:r>
<w:rPr />
</w:r>
</w:p>
- <w:p>
- <w:pPr>
<w:rPr />
</w:pPr>
- <w:r>
<w:rPr />
<w:t xml:space="preserve">content after</w:t>
</w:r>
</w:p>
- <w:sectPr>
<w:type w:val="nextPage" />
<w:pgSz w:w="12240" w:h="15840" /> (This should also be landscape..)
<w:pgMar w:bottom="1425" w:top="1425" w:right="1425" w:left="1425" />
</w:sectPr>
</w:body>
</w:document>
I have a document with content wrapped inside a content annotation.
Within the content, i inserted a section break. Upon insertion, i noticed the following:
- The editor is prepending the new section with an empty paragraph.
- For the last section, the page orientation is not preserved.
In my code I have RadDocument, and converted each contents within the annotation selection to small radDocument objects.
var fragment = selection.CopySelectedDocumentElements(false);
//convert fragment to radDocument then copy the style of the first p
var fragmentDocument = templateRadDocument.CreateDeepCopy() as RadDocument;
convert the fragmentDocument to OpenXML
In the converted RadDocument, it doesnt seem to preserve the correct page orientation for the last section.
<?xml version="1.0" encoding="utf-8" ?>
- <w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
- <w:body>
- <w:p>
- <w:pPr>
<w:rPr />
- <w:sectPr>
<w:type w:val="nextPage" />
<w:pgSz w:w="15840" w:h="12240" w:orient="landscape" />
<w:pgMar w:bottom="1425" w:top="1425" w:right="1425" w:left="1425" />
</w:sectPr>
</w:pPr>
- <w:r>
<w:rPr />
<w:t xml:space="preserve">Content on before section break</w:t>
</w:r>
</w:p>
- <w:p>
- <w:pPr>
<w:rPr />
</w:pPr>
- <w:r>
<w:rPr />
</w:r>
</w:p>
- <w:p>
- <w:pPr>
<w:rPr />
</w:pPr>
- <w:r>
<w:rPr />
<w:t xml:space="preserve">content after</w:t>
</w:r>
</w:p>
- <w:sectPr>
<w:type w:val="nextPage" />
<w:pgSz w:w="12240" w:h="15840" /> (This should also be landscape..)
<w:pgMar w:bottom="1425" w:top="1425" w:right="1425" w:left="1425" />
</w:sectPr>
</w:body>
</w:document>