Просмотрите наши продукты

If so you can download any of the below versions for testing. The product will function as normal except for an evaluation limitation. At the time of purchase we provide a license file via email that will allow the product to work in its full capacity. If you would also like an evaluation license to test without any restrictions for 30 days, please follow the directions provided here.

 

Aspose.html для .net 22.8

Скачать  Скачать 

Сведения о файле

  • Скачатьs:
  • 1
  • Размер файла:
  • 16.12MB
  • Дата добавления:
  • 19/8/2022

Сведения о файле

Improved Processing Speed of CSS Styles

Improved the CSS styles processing speed. Following is a C# code sample of inline CSS usage via API:

using System.IO;
using Aspose.Html;
using Aspose.Html.Rendering.Pdf;
...
    // Create an instance of an HTML document with specified content
    var content = "<p> Inline CSS </p>";
    using (var document = new HTMLDocument(content, "."))
    {
        // Find the paragraph element to set a style attribute
        var paragraph = (HTMLElement)document.GetElementsByTagName("p").First();

        // Set the style attribute
        paragraph.SetAttribute("style", "font-size: 250%; font-family: verdana; color: #cd66aa");

        // Save the HTML document to a file
        document.Save(Path.Combine(OutputDir, "edit-inline-css.html"));

        // Create the instance of the PDF output device and render the document into this device
        using (var device = new PdfDevice(Path.Combine(OutputDir, "edit-inline-css.pdf")))
        {
            // Render HTML to PDF
    		document.RenderTo(device);
        }                     
    }

Improved HTML to Image Conversion

Improved the conversion of HTML to Image formats and resolved the rendering issues. The following simple C# code sample converts HTML to PNG format:

using System.IO;
using Aspose.Html.Converters;
using Aspose.Html.Rendering.Image;
using Aspose.Html.Saving;
...
    // Invoke the ConvertHTML method to convert the HTML code to PNG image           
    Converter.ConvertHTML(@"<h1>Convert HTML to PNG!</h1>", ".", new ImageSaveOptions(), Path.Combine(OutputDir, "convert-with-single-line.png"));

For a complete list of features, enhancements, and bug fixes in this release please visit, Aspose.HTML for .NET 22.8 Выпуск заметок.

 Русский