### XpsRenderingOptions Page Setup Property - Java Source: https://reference.aspose.com/html/java/com.aspose.html.rendering.xps/xpsrenderingoptions Explains how to get the page setup object for configuring the output page settings during XPS rendering. This property allows customization of the page layout. ```java getPageSetup Gets a page setup object is used for configuration output page-set. ``` -------------------------------- ### Define Markdown Parser Setup Interface - Java Source: https://reference.aspose.com/html/java/com.aspose.html.toolkit.markdown.syntax.parser/markdownsyntaxextension/setup The `Setup` method in `MarkdownSyntaxExtension` defines the abstract interface for configuring an `IMarkdownParserBuilder`. It takes an `IMarkdownParserBuilder` object as input to facilitate the setup process. ```java public abstract void Setup(IMarkdownParserBuilder builder) ``` -------------------------------- ### Java Property for Page Setup Configuration Source: https://reference.aspose.com/html/java/com.aspose.html.rendering/renderingoptions Gets a page setup object used for configuring the output page settings in Aspose.HTML rendering. ```java // Example of accessing page setup PageSetup pageSetup = renderingOptions.getPageSetup(); ``` -------------------------------- ### HugoSyntaxExtension.Setup Method Source: https://reference.aspose.com/html/java/com.aspose.html.toolkit.markdown.syntax.extensions/hugosyntaxextension/setup This section details the Setup method within the HugoSyntaxExtension class, which is used to define the interface for markdown parser setup. ```APIDOC ## HugoSyntaxExtension.Setup Method ### Description Defines the interface for Setup. This method configures the markdown parser builder. ### Method `void` ### Endpoint N/A (This is a class method, not an API endpoint) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```csharp // Example of how to use the Setup method (conceptual) hugoSyntaxExtension.Setup(markdownParserBuilder); ``` ### Response #### Success Response N/A (This method is void and does not return a value) #### Response Example N/A ``` -------------------------------- ### RenderingOptions.PageSetup Property Source: https://reference.aspose.com/html/java/com.aspose.html.rendering/renderingoptions/pagesetup Gets a page setup object used for configuring output pages. This property allows access to the PageSetup object for detailed page layout and formatting. ```APIDOC ## RenderingOptions.PageSetup Property ### Description Gets a page setup object used for configuring output pages. This property allows access to the PageSetup object for detailed page layout and formatting. ### Method GET ### Endpoint N/A (This is a property, not an endpoint) ### Parameters This is a property, so it does not have parameters in the traditional API sense. ### Request Example N/A ### Response #### Success Response (200) - **PageSetup** (PageSetup object) - The page setup object used for output page configuration. #### Response Example ```json { "pageSetup": { "//": "PageSetup object details would go here" } } ``` ### See Also - class `PageSetup` - class `RenderingOptions` - package `com.aspose.html.rendering` - package `Aspose.HTML` ``` -------------------------------- ### MarkdownSyntaxExtension.Setup Method Source: https://reference.aspose.com/html/java/com.aspose.html.toolkit.markdown.syntax.parser/markdownsyntaxextension/setup Documentation for the Setup method within the MarkdownSyntaxExtension class, which defines the interface for setting up the markdown parser builder. ```APIDOC ## MarkdownSyntaxExtension.Setup Method ### Description Defines the interface for Setup. ### Method `public abstract void Setup(IMarkdownParserBuilder builder)` ### Endpoint N/A (This is a method documentation, not a REST API endpoint) ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example ```java // Example of how to use the Setup method (conceptual) MarkdownSyntaxExtension extension = new YourConcreteMarkdownSyntaxExtension(); IMarkdownParserBuilder builder = new YourMarkdownParserBuilderImplementation(); extension.Setup(builder); ``` ### Response #### Success Response N/A (This method is void and modifies the builder in place) #### Response Example N/A ### See Also - interface IMarkdownParserBuilder - class MarkdownSyntaxExtension - package com.aspose.html.toolkit.markdown.syntax.parser - package Aspose.HTML ``` -------------------------------- ### Define Setup Interface - HugoSyntaxExtension.Setup (Java) Source: https://reference.aspose.com/html/java/com.aspose.html.toolkit.markdown.syntax.extensions/hugosyntaxextension/setup The HugoSyntaxExtension.Setup method defines the interface for setting up markdown parsing extensions. It takes an IMarkdownParserBuilder as input to configure the parser. ```java public void Setup(IMarkdownParserBuilder builder) ``` -------------------------------- ### JavaScript: Get All Attribute Names of an Element Source: https://reference.aspose.com/html/java/com.aspose.html.dom.svg.filters/svgfefuncgelement This example demonstrates how to get an array of all attribute names present on an element using the `getAttributeNames` method. Returns an empty array if the element has no attributes. ```javascript const elementWithManyAttributes = document.getElementById('complexElement'); const attributeNames = elementWithManyAttributes.getAttributeNames(); console.log('Attribute names:', attributeNames); ``` -------------------------------- ### GfmSyntaxExtension.Setup Method Source: https://reference.aspose.com/html/java/com.aspose.html.toolkit.markdown.syntax.parser.extensions.gfm/gfmsyntaxextension/setup Overrides the Setup method to configure the Markdown parser builder for GFM syntax extension. ```APIDOC ## GfmSyntaxExtension.Setup Method ### Description Overrides the Setup method to configure the Markdown parser builder for GFM syntax extension. ### Method ```java public void Setup(IMarkdownParserBuilder builder) ``` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json { "message": "No request body for this method." } ``` ### Response #### Success Response (200) This method does not return a value, it configures the builder. #### Response Example ```json { "message": "Builder configured successfully." } ``` ### See Also * interface IMarkdownParserBuilder * class GfmSyntaxExtension * package com.aspose.html.toolkit.markdown.syntax.parser.extensions.gfm * package Aspose.HTML ``` -------------------------------- ### Get Text Content from a Start Index - Aspose.HTML Java Source: https://reference.aspose.com/html/java/com.aspose.html.toolkit.markdown.syntax.text/sourcetext/gettext Retrieves text content starting from a specified index. This method is convenient for accessing text from a particular point onwards. It accepts an integer representing the start index and returns the SourceText from that position. An ArgumentOutOfRangeException is thrown if the index is invalid. ```java public SourceText GetText(int start) ``` -------------------------------- ### Initialize XpsDevice with Options and Stream Provider (Java) Source: https://reference.aspose.com/html/java/com.aspose.html.rendering.xps/xpsdevice/xpsdevice Initializes a new instance of the XpsDevice class with specified XpsRenderingOptions and an ICreateStreamProvider. This allows for customized XPS output with detailed control over the rendering process. ```Java public XpsDevice(XpsRenderingOptions options, ICreateStreamProvider streamProvider) ``` -------------------------------- ### HTML to XPS Conversion Example Source: https://reference.aspose.com/html/java/com.aspose.html.converters/converter/converthtml Demonstrates how to convert an HTML file to XPS format using Aspose.HTML for Java. This example shows the setup of input/output paths, stream providers, and save options. ```APIDOC ## Convert HTML to XPS ### Description This example demonstrates the conversion of an HTML file to an XPS document using the Aspose.HTML for Java library. It outlines the necessary steps for setting up input and output file paths, defining save options, and utilizing a stream provider for the output. ### Method N/A (This is a conceptual code example) ### Endpoint N/A ### Parameters #### Path Parameters - **InputFolder** (String) - User source file path. - **OutputFolder** (String) - User output file path. #### Query Parameters None #### Request Body None ### Request Example ```java import System.IO; import com.aspose.html.saving; import com.aspose.html.converters; // Form source file path var sourcePath = Path.Combine(InputFolder, "source.html"); // Form result file path var resultPath = Path.Combine(OutputFolder, "result.xps"); // Use one of ICreateStreamProvider implementation ICreateStreamProvider provider = new FileCreateStreamProvider(resultPath); // Define save options object instance var options = new XpsSaveOptions(); // Initiate conversion process with default configuration Converter.ConvertHTML(sourcePath, new Configuration(), options, provider); ``` ### Response #### Success Response (200) N/A (This is a code example, not an API endpoint response) #### Response Example N/A ``` -------------------------------- ### HTML to PDF Conversion Example Source: https://reference.aspose.com/html/java/com.aspose.html.converters/converter/converthtml This example demonstrates how to convert an HTML string to a PDF file using Aspose.HTML for Java. It shows the setup of the output path, the creation of a stream provider, and the use of PdfSaveOptions. ```APIDOC ## HTML to PDF Conversion Example ### Description This example demonstrates how to convert an HTML string to a PDF file using Aspose.HTML for Java. It shows the setup of the output path, the creation of a stream provider, and the use of PdfSaveOptions. ### Method N/A (Code Example) ### Endpoint N/A (Code Example) ### Parameters N/A (Code Example) ### Request Example ```java // Form inline html content var content = "
Hello, World!
"; // Form result file path var resultPath = Path.Combine(OutputFolder, "result"); // Use one of ICreateStreamProvider implementation ICreateStreamProvider provider = new FileCreateStreamProvider(resultPath); // Define default PdfSaveOptions object var options = new PdfSaveOptions(); // Initiate conversion process with default configuration Converter.ConvertHTML(content, String.Empty, new Configuration(), options, provider); ``` ### Response #### Success Response (200) N/A (Code Example) #### Response Example N/A (Code Example) ``` -------------------------------- ### PageSetup Class Documentation Source: https://reference.aspose.com/html/java/com.aspose.html.rendering/pagesetup Documentation for the PageSetup class, its properties, and methods. ```APIDOC ## PageSetup Class Represents a page setup object used for configuring output page settings. ```java public class PageSetup ``` ### Properties - **getAdjustToWidestPage** (boolean) - Gets or sets a flag that determines if the page size will be adjusted to the widest page in the document. This option can be time-consuming. Adjustment occurs only if the widest page in the document is wider than the page size defined in `PageSetup`. The adjusted page size will be used for all pages. - **setAdjustToWidestPage** (boolean) - Sets the flag for adjusting page size to the widest page. - **getAnyPage** (Page) - Gets the configuration for all pages in the page sequence. - **setAnyPage** (Page) - Sets the configuration for all pages in the page sequence. - **getAtPagePriority** (AtPagePriority) - Gets or sets the `AtPagePriority` which determines the order of applying page size declarations. By default, options override CSS `@page` rules. - **setAtPagePriority** (AtPagePriority) - Sets the `AtPagePriority` for applying page size declarations. - **getFirstPage** (Page) - Gets the configuration for the first page. - **setFirstPage** (Page) - Sets the configuration for the first page. - **getLeftPage** (Page) - Gets the configuration for odd pages. - **setLeftPage** (Page) - Sets the configuration for odd pages. - **getPageLayoutOptions** (PageLayoutOptions) - Gets or sets the `PageLayoutOptions`. The default value is `None`. Any other value will override the `AdjustToWidestPage` behavior. This works only with HTML documents. - **setPageLayoutOptions** (PageLayoutOptions) - Sets the `PageLayoutOptions`. - **getRightPage** (Page) - Gets the configuration for even pages. - **setRightPage** (Page) - Sets the configuration for even pages. ### Methods - **setLeftRightPage**(Page leftPage, Page rightPage) Sets the configuration for left and right pages. ### See Also - package com.aspose.html.rendering - package Aspose.HTML ``` -------------------------------- ### Get Filter Element Y Coordinate - Java Source: https://reference.aspose.com/html/java/com.aspose.html.dom.svg.filters/svgfecolormatrixelement Retrieves the 'y' attribute of a 'filter' element, representing its y-coordinate. This defines the starting y-position of the filter primitive region. ```java String y = filterElement.getY(); ``` -------------------------------- ### HTMLAnchorElement.Hash Property Source: https://reference.aspose.com/html/java/com.aspose.html/htmlanchorelement/hash This section details the HTMLAnchorElement.Hash property, which allows you to get or set the hash segment (the part of the URL starting with '#') of an associated URL. ```APIDOC ## HTMLAnchorElement.Hash Property ### Description Gets or sets a String representation of the hash segment of the associated URL. ### Method Property (Get/Set) ### Endpoint N/A (This is a class property, not an API endpoint) ### Parameters This property does not take direct parameters. It operates on the `HTMLAnchorElement` instance. ### Request Example ```csharp // Assuming 'anchorElement' is an instance of HTMLAnchorElement string currentHash = anchorElement.Hash; anchorElement.Hash = "#section1"; ``` ### Response #### Success Response (Property Access) - **Hash** (String) - The hash segment of the URL. #### Response Example ```json { "Hash": "#section1" } ``` ### See Also - `class HTMLAnchorElement` - `package com.aspose.html` - `package Aspose.HTML` ``` -------------------------------- ### Initialize XpsDevice with Options and Output Stream (Java) Source: https://reference.aspose.com/html/java/com.aspose.html.rendering.xps/xpsdevice/xpsdevice Initializes a new instance of the XpsDevice class with rendering options and an output Stream. This constructor allows for customized XPS rendering directly into a stream. ```Java public XpsDevice(XpsRenderingOptions options, Stream stream) ``` -------------------------------- ### HTML to GIF Conversion Source: https://reference.aspose.com/html/java/com.aspose.html.converters/converter/converthtml This guide explains the supported scenarios for converting HTML to GIF images using Aspose.HTML API and provides examples. ```APIDOC ## POST /convert/html/to/gif ### Description Converts an HTML document to a GIF image. ### Method POST ### Endpoint /convert/html/to/gif ### Parameters #### Query Parameters - **sourcePath** (string) - Required - The path to the source HTML file or URL. - **outputPath** (string) - Required - The path where the resulting GIF image will be saved. #### Request Body *No request body is typically needed for this type of conversion when using file paths. For in-memory conversion or direct HTML content, a different endpoint or request structure might be used.* ### Request Example ```java import System.IO; import com.aspose.html.saving; import com.aspose.html.converters; // Form source file path var sourcePath = Path.Combine(InputFolder, "source.html"); // Form result file path var outputPath = Path.Combine(OutputFolder, "result.gif"); import (HTMLDocument document = new HTMLDocument(sourcePath, new Configuration())) { // Define save options object instance for GIF format var options = new ImageSaveOptions(ImageFormat.Gif); // Initiate conversion process Converter.ConvertHTML(document, options, outputPath); } ``` ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating successful conversion. - **outputPath** (string) - The path to the generated GIF image. #### Response Example ```json { "message": "HTML converted to GIF successfully.", "outputPath": "/path/to/your/output/result.gif" } ``` ``` -------------------------------- ### Initialize XpsDevice with Options and Output File Name (Java) Source: https://reference.aspose.com/html/java/com.aspose.html.rendering.xps/xpsdevice/xpsdevice Initializes a new instance of the XpsDevice class with rendering options and a specified output file name. This constructor provides control over rendering settings while directing output to a file. ```Java public XpsDevice(XpsRenderingOptions options, String file) ``` -------------------------------- ### DocDevice.BeginPage Method Source: https://reference.aspose.com/html/java/com.aspose.html.rendering.doc/docdevice/beginpage Begins rendering of a new page with a specified size. ```APIDOC ## DocDevice.BeginPage ### Description Begins rendering of the new page. ### Method `public void BeginPage(SizeF size)` ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example ```java // No request body for this method ``` ### Response #### Success Response (200) N/A (This is a void method) #### Response Example ```json // No response body for this method ``` ### See Also - class DocDevice - package com.aspose.html.rendering.doc - package Aspose.HTML ``` -------------------------------- ### Get Filter Element X Coordinate - Java Source: https://reference.aspose.com/html/java/com.aspose.html.dom.svg.filters/svgfecolormatrixelement Retrieves the 'x' attribute of a 'filter' element, representing its x-coordinate. This defines the starting x-position of the filter primitive region. ```java String x = filterElement.getX(); ``` -------------------------------- ### Create and Configure Configuration Instance - Java Source: https://reference.aspose.com/html/java/com.aspose.html/configuration/create This method creates and configures an instance of the Configuration object using a provided configuration builder. It allows for more advanced setup by passing an ActionHello, World!
", "resultFileName": "result.pdf" } ``` ### Request Example ```java import System.IO; import com.aspose.html.saving; import com.aspose.html.converters; // ... other imports and setup // Form inline html content var content = "Hello, World!
"; // Form result file path var resultPath = Path.Combine(OutputFolder, "result.pdf"); // Define default PdfSaveOptions object var options = new PdfSaveOptions(); // Initiate conversion process with default configuration Converter.ConvertHTML(content, String.Empty, new Configuration(), options, resultPath); ``` ### Response #### Success Response (200) - **message** (string) - Indicates the successful conversion and the location of the output file. #### Response Example ```json { "message": "HTML converted to PDF successfully and saved to result.pdf" } ``` ``` -------------------------------- ### DocDevice.BeginDocument Method Source: https://reference.aspose.com/html/java/com.aspose.html.rendering.doc/docdevice/begindocument Begins the rendering process for a given document using the DocDevice. ```APIDOC ## DocDevice.BeginDocument ### Description Begins rendering of the document. ### Method `public void BeginDocument(Document document)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```java // Example usage (conceptual) Document document = new Document("input.html"); DocDevice docDevice = new DocDevice(); // Assuming DocDevice has a constructor docDevice.BeginDocument(document); ``` ### Response #### Success Response (200) No direct response body for this method as it's a void method indicating an action. #### Response Example N/A ``` -------------------------------- ### Initialize DocDevice with Options and Stream Provider (Java) Source: https://reference.aspose.com/html/java/com.aspose.html.rendering.doc/docdevice/docdevice Initializes a new instance of the DocDevice class with specified rendering options and an ICreateStreamProvider. This allows for customized rendering behavior and external stream management. ```java Copypublic DocDevice(DocRenderingOptions options, ICreateStreamProvider streamProvider) ``` -------------------------------- ### JavaScript: Get Elements by Tag Name Source: https://reference.aspose.com/html/java/com.aspose.html.dom.svg.filters/svgfefuncgelement This example shows how to retrieve all elements with a specific tag name within a given element using `getElementsByTagName`. It returns an `HTMLCollection` in document order. ```javascript const articleSection = document.getElementById('article'); const paragraphElements = articleSection.getElementsByTagName('p'); console.log('Number of paragraphs:', paragraphElements.length); ``` -------------------------------- ### Get Section Row Index in Aspose.HTML for Java Source: https://reference.aspose.com/html/java/com.aspose.html/htmltablerowelement The `getSectionRowIndex` property returns the index of a row relative to its current section (THEAD, TFOOT, or TBODY), starting from 0. This is based on DOM Level 2. ```java int sectionIndex = row.getSectionRowIndex(); ``` -------------------------------- ### IDevice.BeginElement Method Documentation Source: https://reference.aspose.com/html/java/com.aspose.html.rendering/idevice/beginelement Provides details on the IDevice.BeginElement method, including its parameters, return value, and related classes. ```APIDOC ## IDevice.BeginElement ### Description Begins rendering of the element. ### Method `public bool BeginElement(Element element, RectangleF rect)` ### Parameters #### Path Parameters - **element** (Element) - Required - The `Element`. - **rect** (RectangleF) - Required - Bounding box of the node. ### Response #### Success Response (200) - **returnValue** (bool) - Returns `true` if element should be processed. ### See Also - class Element - interface IDevice - package com.aspose.html.rendering - package Aspose.HTML ``` -------------------------------- ### Setup Method for GfmSyntaxExtension - Java Source: https://reference.aspose.com/html/java/com.aspose.html.toolkit.markdown.syntax.parser.extensions.gfm/gfmsyntaxextension This code illustrates the setup method for the GfmSyntaxExtension class. This method is intended to be overridden to configure the IMarkdownParserBuilder, allowing for the integration of GFM (GitHub Flavored Markdown) syntax extensions. ```java setup(IMarkdownParserBuilder) ``` -------------------------------- ### Get Start Index of Ordered List - Java Source: https://reference.aspose.com/html/java/com.aspose.html.toolkit.markdown.syntax/orderedlistsyntaxnode/getstart The GetStart method in the OrderedListSyntaxNode class returns the index where an ordered list begins. This is useful for iterating or manipulating list elements. It is part of the com.aspose.html.toolkit.markdown.syntax package. ```java public int GetStart() ``` -------------------------------- ### Get and Set Line Dash Offset in Aspose.HTML (C#) Source: https://reference.aspose.com/html/java/com.aspose.html.dom.canvas/icanvasdrawingstyles/linedashoffset The LineDashOffset property specifies where to start a dash array on a line. It is a double-precision floating-point number. This property is part of the ICanvasDrawingStyles interface within the com.aspose.html.dom.canvas package. ```csharp public double LineDashOffset { get; set; } ``` -------------------------------- ### Initialize ImageDevice with Options and File Path Source: https://reference.aspose.com/html/java/com.aspose.html.rendering.image/imagedevice/imagedevice Initializes a new instance of the ImageDevice class with rendering options and a specified output file name. This provides control over both the rendering process and the output location. Dependencies include ImageRenderingOptions and the ImageDevice class. ```java public ImageDevice(ImageRenderingOptions options, String file) ``` -------------------------------- ### HTMLLIElement.Value Property Source: https://reference.aspose.com/html/java/com.aspose.html/htmllielement/value The HTMLLIElement.Value property allows you to set or get the value attribute of an LI element. This attribute is used to specify the starting number of a list item in an ordered list (OL). It is deprecated in HTML 4.01. ```APIDOC ## HTMLLIElement.Value Property ### Description Resets the sequence number when used in an `OL` element. This corresponds to the `value` attribute definition in HTML 4.01. This attribute is deprecated in HTML 4.01. ### Method This documentation describes a property, not a method with a specific HTTP verb. ### Endpoint This documentation describes a property within a class, not a REST API endpoint. ### Parameters This documentation describes a property, not API parameters. ### Request Example This documentation describes a property, not a request body. ### Response #### Success Response (200) This documentation describes a property, not an API response. #### Response Example ```csharp public int Value { get; set; } ``` ### See Also * class HTMLLIElement * package com.aspose.html * package Aspose.HTML ``` -------------------------------- ### XpsDevice Constructors Source: https://reference.aspose.com/html/java/com.aspose.html.rendering.xps/xpsdevice/xpsdevice This section details the various constructors available for the XpsDevice class, including those that accept stream providers, rendering options, file paths, and streams. ```APIDOC ## XpsDevice Constructors ### Initializes a new instance of the `XpsDevice` class. ```java public XpsDevice(ICreateStreamProvider streamProvider) ``` #### Parameters - **streamProvider** (ICreateStreamProvider) - Required - The stream provider. ### Initializes a new instance of the `XpsDevice` class by rendering options and stream provider. ```java public XpsDevice(XpsRenderingOptions options, ICreateStreamProvider streamProvider) ``` #### Parameters - **options** (XpsRenderingOptions) - Required - Rendering options. - **streamProvider** (ICreateStreamProvider) - Required - Object that implements the `ICreateStreamProvider` interface. ### Initializes a new instance of the `XpsDevice` class. ```java public XpsDevice(String file) ``` #### Parameters - **file** (String) - Required - The output file name. ### Initializes a new instance of the `XpsDevice` class by rendering options and output file name. ```java public XpsDevice(XpsRenderingOptions options, String file) ``` #### Parameters - **options** (XpsRenderingOptions) - Required - Rendering options. - **file** (String) - Required - The output file name. ### Initializes a new instance of the `XpsDevice` class. ```java public XpsDevice(Stream stream) ``` #### Parameters - **stream** (Stream) - Required - The stream. ### Initializes a new instance of the `XpsDevice` class by rendering options and output stream. ```java public XpsDevice(XpsRenderingOptions options, Stream stream) ``` #### Parameters - **options** (XpsRenderingOptions) - Required - Rendering options. - **stream** (Stream) - Required - The output stream. ``` -------------------------------- ### Initialize DeviceConfiguration in Java Source: https://reference.aspose.com/html/java/com.aspose.html.rendering/device-2.deviceconfiguration-2/deviceconfiguration This snippet demonstrates the initialization of the DeviceConfiguration class using its default constructor in Java. This is a common starting point for setting up rendering configurations for HTML content when using the Aspose.HTML library. ```java import com.aspose.html.rendering.DeviceConfiguration; // ... // Create a new instance of DeviceConfiguration using the default constructor DeviceConfiguration config = new DeviceConfiguration(); ``` -------------------------------- ### Get Text Content within a Span (Java) Source: https://reference.aspose.com/html/java/com.aspose.html.toolkit.markdown.syntax.text/sourcetext This method retrieves a portion of the text defined by a TextSpan object. It's useful for extracting specific segments of the source text based on start and end points. ```java public string getText(TextSpan) ``` -------------------------------- ### Get Byte Offset from TypedArray - Java Source: https://reference.aspose.com/html/java/com.aspose.html/typedarray/byteoffset This snippet demonstrates how to retrieve the byte offset from the start of a referenced ArrayBuffer using the ByteOffset property of the TypedArray class in Java. This property returns an integer representing the length in bytes. ```java public int ByteOffset { get; } ``` -------------------------------- ### Initialize DocDevice with Options and Output Stream (Java) Source: https://reference.aspose.com/html/java/com.aspose.html.rendering.doc/docdevice/docdevice Initializes a new instance of the DocDevice class with rendering options and an output stream. This constructor offers flexibility in controlling rendering and directing output to a specific stream. ```java Copypublic DocDevice(DocRenderingOptions options, Stream stream) ``` -------------------------------- ### Get TextSpan from SourceText in Java Source: https://reference.aspose.com/html/java/com.aspose.html.toolkit.markdown.syntax.text/sourcetext/span This code snippet demonstrates how to access the `Span` property of a `SourceText` object in Java. The `Span` property returns a `TextSpan` object, which represents the start and end position of the text within the source. ```java /** * Gets the span. */ public TextSpan Span { get; } ``` -------------------------------- ### Initialize PdfDevice with Options and File Path (Java) Source: https://reference.aspose.com/html/java/com.aspose.html.rendering.pdf/pdfdevice/pdfdevice This constructor initializes a new instance of the PdfDevice class with rendering options and a specified output file name. It enables customized PDF generation saved to a file. Dependencies include PdfRenderingOptions. ```java public PdfDevice(PdfRenderingOptions options, String file) ``` -------------------------------- ### Get Current SVG Time - Java Source: https://reference.aspose.com/html/java/com.aspose.html.dom.svg/svgsvgelement/getcurrenttime The GetCurrentTime method returns the current time in seconds relative to the start time of the SVG document fragment. It returns 0 if the document timeline has not yet begun. This method is part of the com.aspose.html.dom.svg package. ```java public float GetCurrentTime() ``` -------------------------------- ### Get Parent Browsing Context - C# Source: https://reference.aspose.com/html/java/com.aspose.html.dom/ibrowsingcontext/parent Retrieves the parent browsing context of the current IBrowsingContext. This property is useful for navigating up the hierarchy of browsing contexts, for example, to access a parent window or frame. It returns null if the current context is the top-level context. ```csharp public IBrowsingContext Parent { get; } ``` -------------------------------- ### MarkdownSyntaxTree Constructor with Configuration Source: https://reference.aspose.com/html/java/com.aspose.html.toolkit.markdown.syntax/markdownsyntaxtree/markdownsyntaxtree Creates an instance of the MarkdownSyntaxTree with a specified Configuration. ```APIDOC ## MarkdownSyntaxTree(Configuration) ### Description Creates the MarkdownSyntaxTree with the provided Configuration. ### Method Constructor ### Endpoint N/A (Class Constructor) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```java // Assuming Configuration class is available Configuration config = new Configuration(); MarkdownSyntaxTree mdt = new MarkdownSyntaxTree(config); ``` ### Response #### Success Response (200) N/A (Constructor) #### Response Example N/A (Constructor) ### See Also * class Configuration * class MarkdownSyntaxTree * package com.aspose.html.toolkit.markdown.syntax * package Aspose.HTML ``` -------------------------------- ### ImageDevice Constructors Source: https://reference.aspose.com/html/java/com.aspose.html.rendering.image/imagedevice/imagedevice This section details the different ways to initialize an ImageDevice object, allowing for flexible output handling through stream providers, file paths, or direct streams, with optional rendering configurations. ```APIDOC ## ImageDevice(ICreateStreamProvider) ### Description Initializes a new instance of the `ImageDevice` class with a stream provider. ### Method CONSTRUCTOR ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```java // Assuming ICreateStreamProvider is implemented ImageDevice device = new ImageDevice(myStreamProvider); ``` ### Response #### Success Response Initializes an `ImageDevice` object. #### Response Example N/A ``` ```APIDOC ## ImageDevice(ImageRenderingOptions, ICreateStreamProvider) ### Description Initializes a new instance of the `ImageDevice` class with specified rendering options and a stream provider. ### Method CONSTRUCTOR ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```java // Assuming ImageRenderingOptions and ICreateStreamProvider are implemented ImageRenderingOptions options = new ImageRenderingOptions(); ImageDevice device = new ImageDevice(options, myStreamProvider); ``` ### Response #### Success Response Initializes an `ImageDevice` object with custom rendering settings. #### Response Example N/A ``` ```APIDOC ## ImageDevice(String) ### Description Initializes a new instance of the `ImageDevice` class with an output file name. ### Method CONSTRUCTOR ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```java ImageDevice device = new ImageDevice("output.png"); ``` ### Response #### Success Response Initializes an `ImageDevice` object to write to the specified file. #### Response Example N/A ``` ```APIDOC ## ImageDevice(ImageRenderingOptions, String) ### Description Initializes a new instance of the `ImageDevice` class with specified rendering options and an output file name. ### Method CONSTRUCTOR ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```java // Assuming ImageRenderingOptions is implemented ImageRenderingOptions options = new ImageRenderingOptions(); ImageDevice device = new ImageDevice(options, "output.png"); ``` ### Response #### Success Response Initializes an `ImageDevice` object with custom rendering settings to write to the specified file. #### Response Example N/A ``` ```APIDOC ## ImageDevice(Stream) ### Description Initializes a new instance of the `ImageDevice` class with an output stream. ### Method CONSTRUCTOR ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```java // Assuming 'outputStream' is an instance of Stream ImageDevice device = new ImageDevice(outputStream); ``` ### Response #### Success Response Initializes an `ImageDevice` object to write to the specified stream. #### Response Example N/A ``` ```APIDOC ## ImageDevice(ImageRenderingOptions, Stream) ### Description Initializes a new instance of the `ImageDevice` class with specified rendering options and an output stream. ### Method CONSTRUCTOR ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```java // Assuming ImageRenderingOptions is implemented and 'outputStream' is an instance of Stream ImageRenderingOptions options = new ImageRenderingOptions(); ImageDevice device = new ImageDevice(options, outputStream); ``` ### Response #### Success Response Initializes an `ImageDevice` object with custom rendering settings to write to the specified stream. #### Response Example N/A ``` -------------------------------- ### PageSetup.AdjustToWidestPage Property (C#) Source: https://reference.aspose.com/html/java/com.aspose.html.rendering/pagesetup/adjusttowidestpage Gets or sets a flag that determines if the page size will be adjusted to the widest page in the document. This option can significantly increase processing time. The adjustment occurs only if the widest page is wider than the current page setup. Once adjusted, this size is applied to all pages. ```csharp public bool AdjustToWidestPage { get; set; } ``` -------------------------------- ### Initialize PdfDevice with Options and Stream Provider (Java) Source: https://reference.aspose.com/html/java/com.aspose.html.rendering.pdf/pdfdevice/pdfdevice This constructor initializes a new instance of the PdfDevice class using both rendering options and a stream provider. It allows for customization of the PDF rendering process and specifies the output destination. Dependencies include PdfRenderingOptions and ICreateStreamProvider. ```java public PdfDevice(PdfRenderingOptions options, ICreateStreamProvider streamProvider) ``` -------------------------------- ### Get Elements by Multiple Class Names in C# with Aspose.HTML Source: https://reference.aspose.com/html/java/com.aspose.html.dom/document/getelementsbyclassname Illustrates using Aspose.HTML in C# to find elements that match multiple class names. The method returns a live HTMLCollection of matching elements, and the example prints their inner HTML and type. Requires the Aspose.HTML library. ```csharp import System; import Aspose.Html; import com.aspose.html.collections; import com.aspose.html.dom; ... import (var document = new HTMLDocument(inputHtmlPath)) { HTMLCollection htmlCollection = document.GetElementsByClassName("ddd"); Console.WriteLine($"Found: {htmlCollection.Length}" ); foreach (Element element in htmlCollection) { Console.WriteLine(element.InnerHTML); Console.WriteLine($"Element type: {element.GetType()}"); } // User code goes here } ``` -------------------------------- ### Get Section Row Index - Aspose.HTML for Java Source: https://reference.aspose.com/html/java/com.aspose.html/htmltablerowelement/sectionrowindex This C# code snippet demonstrates how to access the SectionRowIndex property of an HTMLTableRowElement. This property returns the index of the row within its current section (thead, tbody, or tfoot), starting from 0. It is part of the DOM Level 2 specification. ```csharp public int SectionRowIndex { get; } ``` -------------------------------- ### XpsRenderingOptions Class Documentation Source: https://reference.aspose.com/html/java/com.aspose.html.rendering.xps/xpsrenderingoptions Documentation for the XpsRenderingOptions class, including constructors and properties. ```APIDOC ## XpsRenderingOptions Class ### Description Represents rendering options for `XpsDevice`. ```java public class XpsRenderingOptions : RenderingOptions ``` ## Constructors ### XpsRenderingOptions() - **Description**: The default constructor. ## Properties ### backgroundColor - **Description**: Gets or sets Color which will fill background of every page. Default value is Transparent. - **Type**: Color - **Access**: Read/Write ### css - **Description**: Gets a `CssOptions` object which is used for configuration of css properties processing. - **Type**: CssOptions - **Access**: Read ### horizontalResolution - **Description**: Sets or gets horizontal resolution for internal (which are used during filters processing) images, in pixels per inch. By default this property is 300 dpi. - **Type**: float - **Access**: Read/Write ### pageSetup - **Description**: Gets a page setup object is used for configuration output page-set. - **Type**: PageSetup - **Access**: Read ### verticalResolution - **Description**: Sets or gets vertical resolution for internal (which are used during filters processing) images, in pixels per inch. By default this property is 300 dpi. - **Type**: float - **Access**: Read/Write ### See Also - class RenderingOptions - package com.aspose.html.rendering.xps - package Aspose.HTML ``` -------------------------------- ### Get and Set Title Attribute of HTML Elements in Java Source: https://reference.aspose.com/html/java/com.aspose.html/htmldatalistelement This code example shows how to access and modify the advisory title attribute of an HTML element using Aspose.HTML for Java. The title attribute provides tooltip information when hovering over an element. It's a standard HTML attribute. ```java String title = element.getTitle(); element.setTitle("New Advisory Title"); ``` -------------------------------- ### Initialize ImageDevice with Options and Stream Source: https://reference.aspose.com/html/java/com.aspose.html.rendering.image/imagedevice/imagedevice Initializes a new instance of the ImageDevice class with rendering options and an output stream. This allows for customized image rendering and flexible output stream management. Key dependencies are ImageRenderingOptions and the ImageDevice class. ```java public ImageDevice(ImageRenderingOptions options, Stream stream) ``` -------------------------------- ### Get or Set URL Hash Segment - Aspose.HTML Java Source: https://reference.aspose.com/html/java/com.aspose.html/htmlanchorelement/hash The HTMLAnchorElement.Hash property allows you to access and modify the hash segment (the part of the URL starting with '#') of a URL associated with an HTML anchor element. This is useful for navigating to specific sections of a web page. It is part of the com.aspose.html package. ```java public String Hash { get; set; } ``` -------------------------------- ### Initialize ImageDevice with Options and Stream Provider Source: https://reference.aspose.com/html/java/com.aspose.html.rendering.image/imagedevice/imagedevice Initializes a new instance of the ImageDevice class with specific rendering options and a stream provider. This allows for fine-grained control over image output. Dependencies include ImageRenderingOptions, ICreateStreamProvider, and the ImageDevice class. ```java public ImageDevice(ImageRenderingOptions options, ICreateStreamProvider streamProvider) ``` -------------------------------- ### Create Empty TextSpan with Start Position in Java Source: https://reference.aspose.com/html/java/com.aspose.html.toolkit.markdown.syntax.text/textspan/createempty This Java code snippet illustrates how to create an empty TextSpan object starting at a specified position using the static CreateEmpty(int start) method from the Aspose.HTML library. This is useful when you need to initialize a TextSpan that will later contain text starting from a particular index. ```java import com.aspose.html.toolkit.markdown.syntax.text.TextSpan; // Define the starting position int startPosition = 10; // Create an empty TextSpan from a start position TextSpan spanFromStart = TextSpan.CreateEmpty(startPosition); ``` -------------------------------- ### Configuration Constructor Source: https://reference.aspose.com/html/java/com.aspose.html/configuration/configuration Initializes a new instance of the Configuration class for Aspose.HTML Java. ```APIDOC ## Configuration constructor ### Description Initializes a new instance of the `class`. ### Method Constructor ### Endpoint N/A ### Parameters None ### Request Example ```java public Configuration() ``` ### Response N/A ### Remarks You can download the complete examples and data files from GitHub. ### See Also * class Configuration * package com.aspose.html * package Aspose.HTML ``` -------------------------------- ### Set Starting Sequence Number with HTMLOListElement.Start | C# Source: https://reference.aspose.com/html/java/com.aspose.html/htmlolistelement/start The HTMLOListElement.Start property in Aspose.HTML for Java allows you to set the starting sequence number for an ordered list. This corresponds to the 'start' attribute in HTML. ```csharp public int Start { get; set; } ``` -------------------------------- ### Initialize PdfDevice with Options and Stream (Java) Source: https://reference.aspose.com/html/java/com.aspose.html.rendering.pdf/pdfdevice/pdfdevice This constructor initializes a new instance of the PdfDevice class with rendering options and an output stream. It allows for custom PDF rendering directed to a stream. Dependencies include PdfRenderingOptions. ```java public PdfDevice(PdfRenderingOptions options, Stream stream) ```