Sending file with ss:WrapText="1" does not wrap text in PDF returned

After sending a XSL file to convert into PDF via a API call, the rows are reduced to one line. We have the Cell styles set to have ss:WrapText=“1” and if we convert it into XLSX the word wrap is honored. Is there another setting to get the PDF to recognize a column in a row should have word wrap recognized?

@Brian.Ginoza

To ensure that text wrapping is honored when converting an XSL file to PDF using Aspose.Cells, you may need to adjust the settings in your conversion process. While the ss:WrapText="1" attribute is intended to enable text wrapping in Excel, it may not always translate directly to PDF output.

Here are some steps you can take to troubleshoot and potentially resolve the issue:

  1. Check Cell Formatting: Ensure that the cell formatting in your XSL file is correctly set to allow for text wrapping. This includes verifying that the cell height is sufficient to accommodate wrapped text.

  2. Use PdfSaveOptions: When converting to PDF, you can specify additional options using the PdfSaveOptions class. Make sure to set the appropriate properties that might affect text rendering. For example, you can set the OnePagePerSheet property to true if you want to ensure that each sheet is rendered on a separate page.

  3. Adjust Column Widths: Sometimes, adjusting the column widths in your source file can help ensure that text wraps correctly. If the columns are too narrow, the text may not wrap as expected.

  4. Test with Different Formats: If you are experiencing issues with PDF output, try converting the file to other formats (like XLSX or HTML) first to see if the text wrapping is honored there. This can help isolate whether the issue is specific to PDF conversion.

  5. Review API Documentation: Check the Aspose.Cells API documentation for any specific settings related to text wrapping in PDF output. There may be additional properties or methods that can be utilized to achieve the desired result.

If you continue to experience issues, consider sharing a sample of your XSL file and the code you are using for conversion. This can help in diagnosing the problem more effectively.

For further assistance, you may also want to explore similar forum posts or documentation that discuss text wrapping and PDF conversion in Aspose.Cells.

Sources: