We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

PDF table contains white spaces after conversion from HTML

After conversion from HTML, table cell gets white spaces that should not suppose to be there.
I didnt attach code because I also tried converting same document via Aspose live demo, and got the same output.
image.png (67.4 KB)

asposeWhiteSpaceTableBug.zip (54.5 KB)

@giedrius14

The online app implements Aspose.HTML for .NET in codebehind for conversion. Are you using same API or Aspose.PDF for .NET? Please share requested details with us so that we can proceed accordingly.

we are using aspose for java html to pdf converison

InputStream targetStream = new ByteArrayInputStream(renderedHtmlTemplate.getBytes(StandardCharsets.UTF_8));
	HtmlLoadOptions options = new HtmlLoadOptions();
	options.setInputEncoding(StandardCharsets.UTF_8.name());
	options.getPageInfo().setMargin(new MarginInfo(MARGIN_LEFT_PT, MARGIN_BOTTOM_PT, MARGIN_RIGHT_PT, MARGIN_TOP_PT));
	options.setEmbedFonts(true);
	options.setWarningHandler(new PDFWarningCallback());

	Document document = new Document(targetStream, options);

	fontSettings(document);
	document.setIgnoreCorruptedObjects(true);
	document.setFitWindow(true);
	document.setLayersAdded(true);
	document.setEmbedStandardFonts(true);
	document.setAbsentFontTryToSubstitute(true);

	document.save(outputStream);

@giedrius14

We have managed to reproduce the issue in our environment while using Aspose.PDF for Java 20.6 and logged it as PDFJAVA-39518 in our issue tracking system. We will further look into its details and keep you posted with the status of its rectification. Please be patient and spare us some time.

We are sorry for the inconvenience.