Hi,
When converting an Excel worksheet to EMF using Aspose, I noticed the borders are missing in the EMF after inserting the images to DOCX at 100% zoom, which then eventually resulted in missing borders in the PDF after converting the DOCX to PDF.
Code:
var workbook = new Workbook(@".\test.xlsx");
var ws = workbook.Worksheets[0];
ws.PageSetup.PrintArea = @“B6:K6”;
var options = new ImageOrPrintOptions
{
ImageType = ImageType.OfficeCompatibleEmf, // ImageType.Emf for Aspose normal EMF
OnlyArea = false,
TextRenderingHint = TextRenderingHint.AntiAlias, // TextRenderingHint.ClearTypeGridFit for Aspose normal EMF
OnePagePerSheet = true,
Transparent = true
};
ws.PageSetup.LeftMargin =
ws.PageSetup.RightMargin = ws.PageSetup.TopMargin = ws.PageSetup.BottomMargin = ws.PageSetup.HeaderMargin = ws.PageSetup.FooterMargin = 0;
var render = new SheetRender(ws, options);
render.ToImage(0, @".\out.emf");
When copying/pasting it from MS Office manually, the borders are always visible and the borders are also always visible in the converted PDF under any %.
I’ve attached the test files and a screenshot for your reference. Could you please help me take a look?
test.zip (48.3 KB)
image.png (54.7 KB)
Thanks,