Is there a way, using Open XML SDK, to set different page size, orientation and margins 开发者_运维技巧for the first, even an odd pages. I know how to set different headers and footers for the first, even, and odd pages but I can't figure out how to set different first even and odd page properties (size, margin, orientation) .
Regards.
You can't. Those properties are set at the section level, and sectPr elements are attached to specific paragraphs. They apply to everything in the section (not just odd pages for example).
You can of course set page properties for specific pages, by making a section out of them, but this requires hard coded page breaks / section breaks before and after.
精彩评论