开发者

How to set different page properties for the first, even and odd pages using OOXML?

开发者 https://www.devze.com 2023-03-28 19:14 出处:网络
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,

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号