Browse our Products

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 pour .NET 22.8

Download  Support Forum 

File Details

  • Téléchargements :
  • 1
  • Taille du fichier :
  • 16.12MB
  • Date d'ajout :
  • 19/8/2022

File Details

Amélioration de la vitesse de traitement des styles CSS

Amélioration de la vitesse de traitement des styles CSS. Voici un exemple de code C# d’utilisation de CSS en ligne via l’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);
        }                     
    }

Amélioration de la conversion HTML en image

Amélioration de la conversion des formats HTML en formats d’image et résolution des problèmes de rendu. L’exemple de code C# simple suivant convertit le format HTML au format PNG :

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"));

Pour une liste complète des fonctionnalités, améliorations et corrections de bogues de cette version, veuillez consulter Aspose.HTML for .NET 22.8 Release Notes.

 Français