Manages prearranged conversions of content to different formats.

Class members

Methods

  • convert(nodeId: string, encoding: string, pollingInterval: number = 1000, retries: number = 5): Observable<RenditionEntry>
    Repeatedly attempts to create a rendition, through to success or failure.
    • nodeId: string - ID of the target node
    • encoding: string - Name of the rendition encoding
    • pollingInterval: number - Time interval (in milliseconds) between checks for completion
    • retries: number - Number of attempts to make before declaring failure
    • Returns Observable<RenditionEntry> - True if the rendition was created, false otherwise
  • createRendition(nodeId: string, encoding: string): Observable<any>
    Creates a rendition for a node.
    • nodeId: string - ID of the target node
    • encoding: string - Name of the rendition encoding
    • Returns Observable<any> - Null response to indicate completion
  • generateRenditionForNode(nodeId: string): Observable<any>
    Generates a rendition for a node using the first available encoding.
    • nodeId: string - ID of the target node
    • Returns Observable<any> - Null response to indicate completion
  • getAvailableRenditionForNode(nodeId: string): Observable<RenditionEntry>
    Gets the first available rendition found for a node.
  • getRendition(nodeId: string, encoding: string): Observable<RenditionEntry>
    Gets information about a rendition of a node.
    • nodeId: string - ID of the target node
    • encoding: string - Name of the rendition encoding
    • Returns Observable<RenditionEntry> - Information object about the rendition
  • getRenditionUrl(nodeId: string, encoding: string): string
    Gets a URL linking to the specified rendition of a node.
    • nodeId: string - ID of the target node
    • encoding: string - Name of the rendition encoding
    • Returns string - URL string
  • getRenditionsListByNodeId(nodeId: string): Observable<RenditionPaging>
    Gets a list of all renditions for a node.
  • isConversionPossible(nodeId: string, encoding: string): Observable<boolean>
    Checks if the node can be converted using the specified rendition.
    • nodeId: string - ID of the target node
    • encoding: string - Name of the rendition encoding
    • Returns Observable<boolean> - True if the node can be converted, false otherwise
  • isRenditionAvailable(nodeId: string, encoding: string): Observable<boolean>
    Checks if the specified rendition is available for a node.
    • nodeId: string - ID of the target node
    • encoding: string - Name of the rendition encoding
    • Returns Observable<boolean> - True if the rendition is available, false otherwise

Details

ACS allows content items to be converted to other formats for display or delivery. For example, a raw text file might be converted to HTML to enable better formatting in a web browser or a PDF might be converted to an equivalent bitmap image. A rendition is a prearranged conversion that is set up for an item for convenient repeated use. More information about renditions is available in the Content Services documentation.

In the Renditions service methods, the nodeId is a string identifying the content node that the rendition applies to. This can be obtained from Document List component events and various other places in the ADF API. The encoding identifies the conversion performed by the rendition.

See the Renditions API page in the Alfresco JS API for more information about the RenditionPaging class and other implementation details.

© 2023 Alfresco Software, Inc. All Rights Reserved.