Class Sdk


  • public class Sdk
    extends NativeObject
    Initialize the Toolbox add-on, manage its licensing, font directories, and get the value that will be written to the Producer metadata.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void addFontDirectory​(java.lang.String directory)
      Add custom font directory
      static java.net.URI getLicensingService()
      Licensing service to use for all licensing requests (Getter)
      static java.lang.String getProducerFullName()
      The value that will be written by default to the Producer property of a document that is created with the Sdk.
      static java.lang.String getVersion()
      The version of the Toolbox add-on (Getter)
      static void initialize​(java.lang.String license, java.lang.String producerSuffix)
      Initialize the Toolbox add-on, providing a license key and default Producer value.
      static void setLicensingService​(java.net.URI value)
      Licensing service to use for all licensing requests (Setter)
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • addFontDirectory

        public static void addFontDirectory​(java.lang.String directory)
                                     throws NotFoundException

        Add custom font directory

        Parameters:
        directory - The path of the directory which contains additional font files to be considered during processing.
        Throws:
        NotFoundException - The given directory path does not exist.
        java.lang.IllegalArgumentException - if directory is null
      • getVersion

        public static java.lang.String getVersion()

        The version of the Toolbox add-on (Getter)

      • getProducerFullName

        public static java.lang.String getProducerFullName()
        The value that will be written by default to the Producer property of a document that is created with the Sdk.
      • getLicensingService

        public static java.net.URI getLicensingService()

        Licensing service to use for all licensing requests (Getter)

        This property is relevant only for page-based licenses and is used to set the Licensing Gateway Service.

        The default is "https://licensing.pdf-tools.com/api/v1/licenses/" for the online Pdftools Licensing Service. If you plan to use the Licensing Gateway Service instead of the Pdftools Licensing Service, the property’s value must be a URI with the following elements:

        http[s]://[‹user›[:‹password›]@]‹host›[:‹port›]

        Where:

        • http/https: Protocol for connection to the Licensing Gateway Service.
        • ‹user›:‹password› (optional): Credentials for connection to the Licensing Gateway Service (basic authorization).
        • ‹host›: Hostname of the Licensing Gateway Service.
        • ‹port›: Port for connection to the Licensing Gateway Service.

        Example: "http://localhost:9999"

      • setLicensingService

        public static void setLicensingService​(java.net.URI value)

        Licensing service to use for all licensing requests (Setter)

        This property is relevant only for page-based licenses and is used to set the Licensing Gateway Service.

        The default is "https://licensing.pdf-tools.com/api/v1/licenses/" for the online Pdftools Licensing Service. If you plan to use the Licensing Gateway Service instead of the Pdftools Licensing Service, the property’s value must be a URI with the following elements:

        http[s]://[‹user›[:‹password›]@]‹host›[:‹port›]

        Where:

        • http/https: Protocol for connection to the Licensing Gateway Service.
        • ‹user›:‹password› (optional): Credentials for connection to the Licensing Gateway Service (basic authorization).
        • ‹host›: Hostname of the Licensing Gateway Service.
        • ‹port›: Port for connection to the Licensing Gateway Service.

        Example: "http://localhost:9999"

        Throws:
        java.lang.IllegalArgumentException - The URI is invalid.
        java.lang.IllegalArgumentException - if value is null