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

Free Support Forum - aspose.com

HTML to PDF float problem

Hi.
I have a problem while converting HTML file to PDF.
When HTML file has a float sections, result is not good.

In attachment you can see how is HTML displayed and what is conversion result. There is a source HTML file too.

Here is my code to make conversion:

{code}
com.aspose.words.LoadOptions lo = new com.aspose.words.LoadOptions();
lo.setLoadFormat(LoadFormat.HTML);
doc = new Document(filePath, lo);

com.aspose.words.DocumentBuilder builder = new com.aspose.words.DocumentBuilder(doc);
builder.getPageSetup().setTopMargin(30);
builder.getPageSetup().setBottomMargin(15);
builder.getPageSetup().setLeftMargin(30);
builder.getPageSetup().setRightMargin(30);

doc.save(newFile);
{code}

Hi Krzysztof,


Thanks for your inquiry. We tested the scenario and have managed to reproduce the same problem on our end. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-11836. Our product team will further look into the details of this problem and we will keep you updated on the status of correction. We apologize for your inconvenience.

Best regards,

WORDSNET suggest, that You’re working on it in .NET platform. I’d like to remind, that I have problem on Java version of Aspose.

Hi Krzysztof,


Thanks for your inquiry. Please note that the latest version of Aspose.Words for Java is completely auto-ported from .NET, i.e. we do not write code for Aspose.Words for Java; it is generated out automatically from C# code of Aspose.Words for .NET. In your case, the issue, that was previously logged with WORDSNET prefix, would be auto resolved for Java variant of Aspose.Words as well. Your problem will be fixed as soon as the linked issue is resolved.

Best regards,

Hi, I’d like to ask, when can I expect resolve of the WORDSNET-11836 issue?

@krzysztof.kalinowski,

Thanks for your inquiry.

Unfortunately, your issue (WORDSNET-11836) is not resolved yet and there are no estimates available at the moment. Our product team has completed the analysis of this issue. However, because of complexity, the implementation of the fix of this issue has been postponed till a later date (no ETA is available). Rest assured, we will inform you via this thread as soon as this issue will be resolved in future. We apologize for your inconvenience.

Best regards,
Awais Hafeez

The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for .NET 18.12 update and this Aspose.Words for Java 18.12 update.