PrintTwoOnOne class

Office 2013 and later

Print Two Pages Per Sheet. When the object is serialized out as xml, its qualified name is w:printTwoOnOne.

Namespace:  DocumentFormat.OpenXml.Wordprocessing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

public class PrintTwoOnOne : OnOffType

[ISO/IEC 29500-1 1st Edition]

printTwoOnOne (Print Two Pages Per Sheet)

This element specifies whether two pages should be printed on one sheet of paper when this document is printed. Specifically, this element specifies that each page displayed for the contents in a given WordprocessingML document should be the page size specified in the section settings divided in half with two top margins originating from the bisector of the page, and bottom margins instantiated at the top and bottom of each page.

If this element is omitted, then pages should be displayed and printed as one per sheet.

[Example: Consider a one section document with a 2,160 twentieths of a point (one and a half inch) top margin, and 1,440 twentieths of a point (one inch) bottom, right, and left margins surrounding the document editing canvas (represented by the gray shaded area in diagrams below). This page setup is represented in WordprocessingML using the following fragment:

<w:pgMar w:header="0" w:top="2160" w:right="1440" w:bottom="1440" w:left="1440" />

The resulting printed pages would appear as follows:

If a document should be displayed and printed as though two pages were printed on a single sheeting, this requirement would be specified using the following WordprocessingML:

<w:printTwoOnOne w:val="true" />

The printTwoOnOne element's val attribute is equal to true specifying that pages should be printed two to a sheet, resulting in the following printout given these page margins:

end example]

Parent Elements

settings (§

This element’s content model is defined by the common boolean property definition in §17.17.4.

© ISO/IEC29500: 2008.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.