xlsx转为pdf文件时,图片自动缩小了。代码如下:
Workbook wb = new Workbook(xlsPath);
PdfSaveOptions saveOptions = new PdfSaveOptions
{
EmfRenderSetting = EmfRenderSetting.EmfPlusPrefer,
// Optional settings to improve image handling and quality in the PDF
OnePagePerSheet = false, // Set to true if you want each sheet on a single page
// ImageType = Aspose.Cells.Drawing.ImageType.Emf, // Use EMF for higher quality images in the output
AllColumnsInOnePagePerSheet = false, // Ensure column layout is preserved
Compliance = PdfCompliance.PdfA1b, // Optional: PDF/A compliance if needed
// Retain original images in headers/footers and other layers
CheckWorkbookDefaultFont = true// Ensures that default font settings don’t cause image omission