We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Set page margins generated in PDF export

Thread ID:





143243 Mar 11,2019 02:18 PM UTC Mar 13,2019 04:00 AM UTC Angular - EJ 2 3
Tags: Grid
Fabiano Melo
Asked On March 11, 2019 02:18 PM UTC

Good afternoon.

I could not find in the documentation any parameters that allow me to configure the margin of the page generated in the PDF export. I found the margin of the header and the footer, and the sides very large and I would like to reduce.

Pavithra Subramaniyam [Syncfusion]
Replied On March 12, 2019 10:01 AM UTC

Hi Fabiano, 
Greetings from Syncfusion. 
Query : I found the margin of the header and the footer, and the sides very large and I would like to reduce 
We have analyzed your query and we suggest to use the beforePdfExport event to achieve your requirement. In the below sample, we have set the margin of the exported pdf document by overriding the default processSectionExportProperties method. Please refer to the below sample and documentation for your reference, 
import {PdfPageSettings, PdfPageOrientation} from '@syncfusion/ej2-pdf-export' 
      args.gridObject.pdfExportModule.processSectionExportProperties = function (section, pdfExportProperties){ 
            let pdfPageSettings: PdfPageSettings = new PdfPageSettings(); 
        return section; 
Please get back to us for further assistance. 
Pavithra S. 

Fabiano Melo
Replied On March 12, 2019 02:53 PM UTC

Perfect. Tanks!

Thavasianand Sankaranarayanan [Syncfusion]
Replied On March 13, 2019 04:00 AM UTC

Hi Fabiano, 
We are happy that the problem has been solved. 
Please get back to us if you need any further assistance.  
Thavasianand S.                         


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon