fromUri

Creates HTML-to-PDF converter from Uri. Supported URIs are:

  • Local URIs with schemes "file://" and "content://". This includes Android resources and assets (i.e. "file:///android_res/" and "file:///android_asset/").
  • Remote URIs with schemes "http://" and "https://".

Converter will try to load all linked resources (images, stylesheets, JavaScript etc.), if they are accessible. You can provide otherwise inaccessible resources or override default ones by setting custom ResourceInterceptor via setResourceInterceptor.

Parameters

context

The context to use.

uri

Base URI for the HTML content that should be converted to PDF.