Take a survey

Developing Applications Using APIs > Assembling PDF Documents > Setting Page Properties > Page margins

Page margins
You use the PageMargins element to determine the initial placement of page content elements such as headers, watermarks, and tables of contents (see Adding and Manipulating Page Content).
The PageMargins element has four attributes, left, top, right, and bottom, which specify each margin as a distance from the edge of the page. The dimensions of the page are considered to be those corresponding to the PageSize element. The default margins are 36 points (.5 inches).
In this example, all the margins are set to values other than the default. A header and footer are specified by the Header and Footer elements (see Adding and removing headers and footers).
Example: Setting page margins
<PDF result="doc1">
	<PDF source="doc2">
		<PageMargins left="1in" top="0.75in" right="0.75in" bottom="1in"/>
		<Header padding="0.5in">
			<Center>
				<StyledText><p>Header content</p></StyledText>
			</Center>
		</Header>
		<Footer>
			<Center>
				<StyledText><p>Footer content</p></StyledText>
			</Center>
		</Footer>
	</PDF>
</PDF>
The placement of the header is determined by the page margins:
The left side of the Left header will be aligned with the left margin
The right side of the Right header will be aligned with the right margin
Footers behave in a similar manner. Watermarks, backgrounds, and tables of contents also use the margins to determine where to place new content, as described in the individual sections on those elements.
This figure shows the placement of the margins, header and footer defined in the example.
Note: The page margins determine where to place the text or graphics but do not provide a clipping boundary. For example, the figure shows a centered header. If the header has too many characters, it can overflow both the left and right margins. Similarly, a left-justified header can overflow the right margin.
You can specify PageMargins only once within a given scope, except for the case when you use the alternation attribute and specify both OddPages and EvenPages as values. (See Odd and even pages.)
 

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/sdkHelp/assemblePDFPage_properties.102.8.html