Excel in PDF mit Standard oder Minimalgröße speichern
Standardmäßig speichert Aspose.Cells Excel in PDF mit Standardgröße. Sie können es jedoch auch mit Minimalgröße über die Eigenschaft PdfSaveOptions.optimization_type speichern. Es akzeptiert die folgenden Werte
- PdfOptimizationType.STANDARD
- PdfOptimizationType.MINIMUM_SIZE
Excel in PDF mit Standard- oder Minimalgröße speichern mit Aspose.Cells für Python via .NET
Der folgende Beispielcode zeigt, wie Sie Excel in PDF mit Standard- oder Mindestgröße unter Verwendung der Eigenschaft PdfSaveOptions.optimization_type speichern können.
from aspose.cells import PdfSaveOptions, Workbook | |
from aspose.cells.rendering import PdfOptimizationType | |
# For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET | |
# The path to the documents directory. | |
dataDir = RunExamples.GetDataDir(".") | |
# Load excel file into workbook object | |
workbook = Workbook(dataDir + "SampleBook.xlsx") | |
# Save into Pdf with Minimum size | |
opts = PdfSaveOptions() | |
opts.optimization_type = PdfOptimizationType.MINIMUM_SIZE | |
workbook.save(dataDir + "OptimizedOutput_out.pdf", opts) |