Tüm Çalışsayfa Sütunlarını Tek PDF Sayfasına Sığdır
Tüm Çalışsayfa Sütunlarını Tek PDF Sayfasına Sığdır
PdfSaveOptions.setAllColumnsInOnePagePerSheet, çalışsayfanın tüm sütunlarının tek bir PDF sayfasına render edilmesini sağlar, ancak satırlar çalışma sayfasındaki veriye bağlı olarak Birden fazla sayfaya genişleyebilir.
Aşağıdaki örnek kod, 100 sütunlu büyük bir çalışsayfayı PdfSaveOptions.setAllColumnsInOnePagePerSheet özelliğini kullanarak render etme yöntemini gösterir.
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java | |
// The path to the documents directory. | |
String dataDir = Utils.getDataDir(FitAllWorksheetColumns.class); | |
// 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(SaveFormat.PDF); | |
// Set AllColumnsInOnePagePerSheet to true | |
saveOptions.setAllColumnsInOnePagePerSheet(true); | |
// Save Workbook to PDF fromart by passing the object of PdfSaveOptions | |
book.save(dataDir + "output.pdf", saveOptions); |