The HTML format is widely used for creating the webpages or, in other words, the HTML files. These days, every operating system, whether it be of desktop or mobile, contains the built-in web browser that supports viewing the HTML files. Other than that, many free web browsers are also available in the market. This means that any information or the content that is available in the form of HTML pages can easily be viewed just having installed a web browser.
Let’s suppose a scenario where my friend shared with me a Word document created in MS Word but the problem is I don’t have MS Office installed on my system. So how would I view the content of the file? A suitable solution is if I could get the HTML form of that Word document then it can be viewed in my web browser and thus, I won’t have to install MS Office.
Now, you could imagine the usefulness of the HTML format apart from its usage in web development. So, let’s now find out how did we make use of HTML format in making GroupDocs.Assembly more powerful and useful for you.
Since version 19.5 of GroupDocs.Assembly, the assembled Word Processing documents, Spreadsheets, Presentations and Email files could be saved as HTML with resources. This means that the generated reports can now be saved as HTML files along with the resources such as images and, as I have mentioned before, you would only need to have a web browser to view the content of the generated reports.
Let’s take the example of generating the report from the Word template and see how we can save the report as an HTML file. For saving the generated report as HTML with resources, we have added a new property ResourceSaveFolder to the LoadSaveOptions class to specify the folder that will be used to store the resource files. If no folder is specified, by default, external resource files will be stored to a folder having the same name as that of the HTML file (without extension) plus the “_files” suffix. The following code snippets demonstrate this feature:
Along with this feature, we have also added the facility of loading HTML template documents referencing external resource files to be assembled and saved to non-HTML formats. For this, the containing folder of the template file is used as a base URI to resolve external resource files’ relative URIs to absolute ones by default, as shown in the following code snippet:
Well, this would definitely be a really attracting release for you guys. So let’s not wait and download the latest version to check how these features can make your report generation applications more powerful.
For any questions or suggestions, have a conversation with us on our forum.