import {PdfPageSettings, PdfPageOrientation} from '@syncfusion/ej2-pdf-export'
...
beforeExport(args){
args.gridObject.pdfExportModule.processSectionExportProperties = function (section, pdfExportProperties){
let pdfPageSettings: PdfPageSettings = new PdfPageSettings();
...
pdfPageSettings.margins.setMargins(10);
section.setPageSettings(pdfPageSettings);
return section;
}
}... |
What about Images? I am getting default margins around image while using graphics.drawImage(image,0,0,width,height), even after setting x as 0 and y as 0 here, im getting margins around my image.
Hi,
By reviewing your query, it appears you're using the graphics.drawImage() method to draw images in a PDF document, and you're observing default margins around the image despite setting the x and y coordinates to 0. To assist you effectively, could you please provide the following details?
• PDF Export Method: Are you using default grid pdf export to perform the pdf export?
• Library Usage: Please ensure us whether you use PDF library classes for customization during the export?
• Code Snippet: Could you share the code snippet illustrating how you're exporting the pdfDocument?
• Visual: Provide the image of the issue you are facing with image margins in the pdfDocument.
We highly appreciate your co-operation in providing these details.
Regards,
Dineshnarasimman M