احفظ ملف Excel في PDF بالحجم القياسي أو الأدنى
Contents
[
Hide
]
بشكل افتراضي ، يقوم Aspose.Cells بحفظ Excel في PDF بالحجم القياسي. ومع ذلك ، يمكنك أيضًا حفظه بأدنى حجم باستخدام ملفPdfSaveOptions.OptimizationType خاصية. يقبل القيم التالية
- PdfOptimizationType.Sandard
- PdfOptimizationType.MinimumSize
احفظ ملف Excel في PDF بالحجم القياسي أو الأدنى باستخدام Aspose.Cells
يوضح نموذج التعليمات البرمجية التالي كيف يمكنك حفظ Excel في PDF بالحجم القياسي أو الأدنى باستخدامPdfSaveOptions.OptimizationTypeخاصية.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); |