Tüm Çalışma Sayfası Sütunlarını Tek PDF Sayfaya Sığdır

Çalışma Sayfası Sütunlarını Tek PDF Sayfaya Sığdır

PdfSaveOptions.AllColumnsInOnePagePerSheetbir çalışma sayfasındaki tüm sütunların tek bir PDF sayfasına dönüştürülmesini sağlar, ancak çalışma sayfasındaki verilere bağlı olarak satırlar birkaç sayfaya genişleyebilir.

Aşağıdaki örnek kod nasıl kullanılacağını gösterirPdfSaveOptions.AllColumnsInOnePagePerSheet100 sütunluk büyük bir çalışma sayfası oluşturma özelliği.

// 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);
// Create and initialize an instance of Workbook
Workbook book = new Workbook(dataDir + "TestBook.xlsx");
// Create and initialize an instance of PdfSaveOptions
PdfSaveOptions saveOptions = new PdfSaveOptions();
// Set AllColumnsInOnePagePerSheet to true
saveOptions.AllColumnsInOnePagePerSheet = true;
// Save Workbook to PDF fromart by passing the object of PdfSaveOptions
dataDir = dataDir+ "output.out.pdf";
book.Save(dataDir, saveOptions);