There are blank spaces when converting spreadsheets to PDF after printing and scaling settings

There are blank spaces when converting spreadsheets to PDF after printing and scaling settings
image.png (61.5 KB)

this is my file:
EPPR_78051.zip (305.8 KB)

this is my code

Workbook workbook = new Workbook("D:\\Smartbi_WorkSpace\\Persional\\AsposeTest\\data\\EPPR_78051\\EPPR_78051.xlsx");
			workbook.save("D:\\Smartbi_WorkSpace\\Persional\\AsposeTest\\data\\EPPR_78051\\output\\EPPR_78051.pdf");

@xhaixia
By reviewing your sample file, we found that it has been set to center horizontally and vertically. If you want to remove this setting when exporting to PDF, you can refer to the following sample code. Please refer to the attachment. result.zip (282.1 KB)

The sample code as follows:

Workbook workbook = new Workbook(filePath + "EPPR_78051.xlsx");
int count = workbook.getWorksheets().getCount();
for (int i = 0; i < count; i++)
{
	Worksheet sheet = workbook.getWorksheets().get(i);
	PageSetup page = sheet.getPageSetup();
	page.setCenterVertically(false);
	page.setCenterHorizontally(false);
}
workbook.save(filePath + "out_java.pdf");

Hope helps a bit.