Excel を PDF に標準サイズまたは最小サイズで保存

Aspose.Cells を使用して、標準サイズまたは最小サイズで Excel を PDF に保存します。

次のサンプル コードは、Excel を標準サイズまたは最小サイズで PDF に保存する方法を示しています。PdfSaveOptions.OptimizationType財産。

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
// Load excel file into workbook object
Workbook workbook = new Workbook(dataDir + "SampleBook.xlsx");
// Save into Pdf with Minimum size
PdfSaveOptions opts = new PdfSaveOptions();
opts.OptimizationType = Aspose.Cells.Rendering.PdfOptimizationType.MinimumSize;
workbook.Save(dataDir + "OptimizedOutput_out.pdf", opts);