DsExcel Java allows users to export Excel files with vertical text to PDF without any issues.
While saving an Excel file with vertical text correctly to a PDF file, the following properties can be used -
Refer to the following example code in order to export vertical text to PDF.
Java |
Copy Code |
---|---|
// Initialize workbook Workbook workbook = new Workbook(); // Fetch default worksheet IWorksheet worksheet = workbook.getWorksheets().get(0); // Fetch the cell range A1 IRange a1 = worksheet.getRange("A1"); // Setting Cell A1 Text a1.setValue("This is a vertical text"); // Formatting A1 cell a1.getFont().setName("Verdana"); a1.setHorizontalAlignment(HorizontalAlignment.Right); a1.setVerticalAlignment(VerticalAlignment.Top); a1.setOrientation(90); a1.setWrapText(true); a1.setColumnWidth(27); a1.setRowHeight(190); // Saving workbook to PDF workbook.save("6- ExportVerticalTextToPDF.pdf", SaveFileFormat.Pdf); |