J'essaie de réduire l'espace entre le pied de page et le corps lors de la conversion de Excel vers pdf en utilisant l'espace de noms Microsoft.Office.Interop.Excel
Image liée au problème (écran imprimé de PDF consulté sur chrome):
J'ai mis toutes les marges à zéro dans la feuille.
var settings = xlWorkSheet.PageSetup; settings.PaperSize = Microsoft.Office.Interop.Excel.XlPaperSize.xlPaperA4; settings.LeftMargin = xlExcel.InchesToPoints(0.0); settings.RightMargin = xlExcel.InchesToPoints(0.0); settings.TopMargin = xlExcel.InchesToPoints(0.0); settings.BottomMargin = xlExcel.InchesToPoints(0.0); settings.HeaderMargin = xlExcel.InchesToPoints(0.0); settings.FooterMargin = xlExcel.InchesToPoints(0.0); settings.Zoom = false; settings.FitToPagesWide = 1; settings.FitToPagesTall = false; settings.PrintArea = "$A$1:$H$55"; settings.CenterFooter = "Page &P of &N"; xlWorkSheet.ExportAsFixedFormat(XlFixedFormatType.xlTypePDF, System.Windows.Forms.Application.StartupPath + "\\" + output);
Mais le problème persiste. Existe-t-il un moyen de diminuer cet espace?