Skip to content

Set different margin in each page PDF export (multiple page) Angular #1897

Description

@syafieqq

Hi,
i'am currently looking a way to set different margin in each page pdf export. Previously, i create a repeat header start from page 2 with top margin 10 cm and leave header blank on first page, but the problem is, on first page will leave blank header with margin 10cm where is quite weird. How could i set margin top for first page with 0 cm?, below is the current code:

<kendo-grid-pdf fileName="Products.pdf" [allPages]="true" paperSize="A4" [repeatHeaders]="true" [landscape]="true">
<kendo-grid-pdf-margin top="10cm" left="1cm" right="1cm" bottom="2cm"></kendo-grid-pdf-margin>
<ng-template kendoGridPDFTemplate let-pageNum="pageNum" let-totalPages="totalPages">
	<div class="page-template">
		<div class="header">
			<div style="float: right">Page {{ pageNum }} of {{ totalPages }}</div>
			<ng-template let-a="aVariable" [ngTemplateOutletContext]="{ aVariable: pageNum }" [ngTemplateOutlet]="selfie" #selfie>
				<div  *ngIf="a != 1;">
					<h1>MY EXAMPLE HEADER</h1>
				</div>
			</ng-template>
		</div>
	</div>
</ng-template>
</kendo-grid-pdf>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions