A large row ID value truncated when row column header is visible when converting Excel to PDF

Hi,

I’ve enabled setPrintHeadings on a worksheet prior to converting it to PDF and I noticed that row IDs that are greater than 999 (i.e. 4 digits) are truncated in the PDF. (see screenshot)

Is there a way to set the row header column width so the row IDs can be fully visible?

Screenshot 2025-09-22 at 5.25.18 PM.png (7.5 KB)

@yoohee
By creating a sample file based on the provided information and testing it on the latest version v25.9 using the following sample code, we can obtain the correct results. Please refer to the attachment. sample.zip (217.4 KB)

// Load your Excel file
Workbook workbook = new Workbook(filePath + "sample.xlsx");

// Access the first worksheet
Worksheet worksheet = workbook.getWorksheets().get(0);
// Set the print headings
worksheet.getPageSetup().setPrintHeadings(true);

// Save the workbook as PDF
workbook.save(filePath + "out_java.pdf", SaveFormat.PDF);

We recommend you to kindly try using our latest version: Aspose.Cells for .NET 25.9.

If you still find the issue, kindly do share your complete sample (runnable) code and template Excel file (if any) to reproduce the issue on our end, we will check it soon.

I tried again with the sample file you shared and the issue cannot be reproduced. Not sure how it happened initially but since I cannot repro we can close this issue. I will re-report if it happens again.

@yoohee,

Good to know that your issue is sorted out now. Please feel free to write us back if you have further queries or issue.