Please, show me, how can to convert html to image without loss of style html page?
Hello
Thanks for your inquiry. It is extremely difficult and often impossible to produce image which looks exactly as source HTML. This is because HTML is one page document and this format is designed for Web.
Also, you should note, that not all features of HTML are supported.
Please try using the following code to convert your HTML to image:
Document doc = new Document("Test/in.html");
doc.SaveToImage(0, doc.PageCount, "Test/out.tif", null);
Also, please see the following link to learn more:
Best regards,
Спасибо. Попробую. Если будут вопросы, спрошу еще.
this example does not work.
Hi
Thank you for additional information. Could you please attach your HTML here for testing? I’ll check the problem on my side and provide you more information.
Best regards,
html-page is saved as an image, but css style is lost. o specific page. I try to http://www.google.ru
That’s what the picture is obtained.
Hi
Thank you for additional information. CSS styles are not fully supported during HTML import. Your request has been linked to the appropriate issue. You will be notified as soon as it is supported.
As a workaround you can try using inline styles.
And as I mentioned you earlier HTML documents are not Word documents, HTML is one page document and this format is designed for Web and not for displaying on pages/images.
Best regards,
This option also did not help.
document.SaveOptions.HtmlExportCssStyleSheetType = CssStyleSheetType.Embedded;
You want to say that the Html-page is not properly converted from a picture.
Hi
When you open HTML document using Aspose.Words, HTML document is converted to Aspose.Words Document Object Model (DOM). Please see the following link to learn more about Aspose.Words DOM and its relationships.
HtmlExportCssStyleSheetType we use during saving to HTML. It does not have any effect during HTML import.
In additional, Aspose.Words is designed to programmatically create, convert and edit MS Word documents.
Best regards,
The issues you have found earlier (filed as WORDSNET-39) have been fixed in this .NET update and this Java update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(4)
The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan