Adatta Tutte le Colonne del Foglio di Lavoro su una Singola Pagina PDF
Adatta le Colonne del Foglio di Lavoro su una Singola Pagina PDF
PdfSaveOptions.AllColumnsInOnePagePerSheet garantisce che tutte le colonne in un foglio di lavoro siano rese in un’unica pagina PDF, anche se le righe possono espandersi su più pagine a seconda dei dati presenti nel foglio di lavoro.
Il codice di esempio qui sotto mostra come utilizzare la proprietà PdfSaveOptions.AllColumnsInOnePagePerSheet per rendere un ampio foglio di lavoro con 100 colonne.
// 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); |