Class Examples


  • public class Examples
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Examples()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void chartExample​(java.lang.String APIKey)
      This example show how to build a line chart.
      void combinedChartExample​(java.lang.String APIKey)
      This example show how to build a combined chart.
      void COPPDFTextAndImageExample​(java.lang.String APIKey)
      This example shows you how to add text and images on pages of a template without tag.
      void localJson​(java.lang.String APIKey)
      Example where the local test.json is read and send to the server.
      void localTemplate​(java.lang.String APIKey)
      Example with templateTest.docx as template, a list of properties and an image as data.
      void localTemplateAsync​(java.lang.String APIKey)
      Asynchronous version of the above example.
      void loopExample​(java.lang.String APIKey)
      In this example 2 nested loops are given in the template.
      void prependAppendSubTemplatesExample​(java.lang.String APIKey)
      This example shows you how to prepend/append files and how to use subtemplates in a template.
      void qrCodeExample​(java.lang.String APIKey)
      This example show how to work with Codes (QR code and barcode).
      void signPDF​(java.lang.String APIKey)
      This example show you how to sign a PDF file.
      void waterMarkAndStyledProperty​(java.lang.String APIKey)
      Example for a styled property and a watermark.
      void withoutTemplate​(java.lang.String APIKey)
      Example without template.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Examples

        public Examples()
    • Method Detail

      • localJson

        public void localJson​(java.lang.String APIKey)
        Example where the local test.json is read and send to the server. The output is downloaded in downloads and named outputLocalJson.
        Parameters:
        APIKey - Your Cloud Office Print APIKey.
      • withoutTemplate

        public void withoutTemplate​(java.lang.String APIKey)
        Example without template. Cloud Office Print will generate the template based on the data. Output type determines the template type generated. Cannot be PDF in this case.
        Parameters:
        APIKey - Your Cloud Office Print APIKey.
      • localTemplate

        public void localTemplate​(java.lang.String APIKey)
        Example with templateTest.docx as template, a list of properties and an image as data. A zipfile named outputLocalTemplate will contain 2 outputs files in the downloads folder.
        Parameters:
        APIKey - Your Cloud Office Print APIKey.
      • localTemplateAsync

        public void localTemplateAsync​(java.lang.String APIKey)
        Asynchronous version of the above example. Example with templateTest.docx as template, a list of properties and an image as data. A zipfile named outputLocalTemplate will contain 2 outputs files in the downloads folder.
        Parameters:
        APIKey - Your Cloud Office Print APIKey.
      • loopExample

        public void loopExample​(java.lang.String APIKey)
        In this example 2 nested loops are given in the template. One for the orders and one for the products per order.
        Parameters:
        APIKey - Your Cloud Office Print APIKey.
      • chartExample

        public void chartExample​(java.lang.String APIKey)
        This example show how to build a line chart.
        Parameters:
        APIKey - Your Cloud Office Print APIKey.
      • combinedChartExample

        public void combinedChartExample​(java.lang.String APIKey)
        This example show how to build a combined chart.
        Parameters:
        APIKey - Your Cloud Office Print APIKey.
      • qrCodeExample

        public void qrCodeExample​(java.lang.String APIKey)
        This example show how to work with Codes (QR code and barcode).
        Parameters:
        APIKey - Your Cloud Office Print APIKey.
      • prependAppendSubTemplatesExample

        public void prependAppendSubTemplatesExample​(java.lang.String APIKey)
                                              throws java.lang.Exception
        This example shows you how to prepend/append files and how to use subtemplates in a template. Look in the generalTests to see the code.
        Parameters:
        APIKey - Your Cloud Office Print APIKey.
        Throws:
        java.lang.Exception - Exceptions.
      • COPPDFTextAndImageExample

        public void COPPDFTextAndImageExample​(java.lang.String APIKey)
        This example shows you how to add text and images on pages of a template without tag. The output format needs to be PDF.
        Parameters:
        APIKey - Your Cloud Office Print APIKey.
      • waterMarkAndStyledProperty

        public void waterMarkAndStyledProperty​(java.lang.String APIKey)
        Example for a styled property and a watermark.
        Parameters:
        APIKey - Your Cloud Office Print APIKey.
      • signPDF

        public void signPDF​(java.lang.String APIKey)
        This example show you how to sign a PDF file. (Invisible signature, only to be seen in the options of the file).
        Parameters:
        APIKey - Your Cloud Office Print APIKey.