#include <TemplateDocument.h>
The class TemplateDocument. Encapsulates a template document that can merged with data to generate any number of PDFs.
TemplateDocument instances are created through the Convert class. See Convert.CreateOfficeTemplate. 
Definition at line 27 of file TemplateDocument.h.
 
      
        
          | pdftron::PDF::TemplateDocument::TemplateDocument  | 
          ( | 
           | ) | 
           | 
        
      
 
 
      
        
          | pdftron::PDF::TemplateDocument::TemplateDocument  | 
          ( | 
          const TemplateDocument &  | 
          other | ) | 
           | 
        
      
 
 
      
        
          | pdftron::PDF::TemplateDocument::TemplateDocument  | 
          ( | 
          TRN_TemplateDocument  | 
          impl | ) | 
           | 
        
      
 
 
      
        
          | pdftron::PDF::TemplateDocument::~TemplateDocument  | 
          ( | 
           | ) | 
           | 
        
      
 
 
      
        
          | void pdftron::PDF::TemplateDocument::CancelConversion  | 
          ( | 
           | ) | 
           | 
        
      
 
Cancel the current template filling, forcing FillTemplateJson to return. 
 
 
  
  
      
        
          | static TemplateDocument* pdftron::PDF::TemplateDocument::CreateInternal  | 
          ( | 
          ptrdiff_t  | 
          impl | ) | 
           | 
         
       
   | 
  
static   | 
  
 
 
      
        
          | void pdftron::PDF::TemplateDocument::Destroy  | 
          ( | 
           | ) | 
           | 
        
      
 
 
      
        
          | PDFDoc pdftron::PDF::TemplateDocument::FillTemplateJson  | 
          ( | 
          UString  | 
          json | ) | 
           | 
        
      
 
Create a PDF by merging JSON data with this template document.
- Parameters
 - 
  
    | json | A JSON dictionary mapping template keys to their replacement content.  | 
  
   
- Returns
 - The PDFDoc from the template filling result. 
 
 
 
      
        
          | void pdftron::PDF::TemplateDocument::FillTemplateJsonToOffice  | 
          ( | 
          UString  | 
          json,  | 
        
        
           | 
           | 
          UString  | 
          output_path  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Create an office file by merging JSON data with this template document. This function currently only supports DOCX input.
- Parameters
 - 
  
    | json | A JSON dictionary mapping template keys to their replacement content.  | 
    | output_path | The path where the output file is written.  | 
  
   
 
 
      
        
          | void pdftron::PDF::TemplateDocument::FillTemplateJsonToOfficeWithFilter  | 
          ( | 
          UString  | 
          json,  | 
        
        
           | 
           | 
          Filters::Filter &  | 
          output_stream  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Create an office file by merging JSON data with this template document. This function currently only supports DOCX input.
- Parameters
 - 
  
    | json | A JSON dictionary mapping template keys to their replacement content.  | 
    | output_stream | An output stream.  | 
  
   
 
 
      
        
          | Result pdftron::PDF::TemplateDocument::GetConversionStatus  | 
          ( | 
           | ) | 
           const | 
        
      
 
Get the state of the template filling process.
- Returns
 
 
 
      
        
          | UString pdftron::PDF::TemplateDocument::GetErrorString  | 
          ( | 
           | ) | 
           const | 
        
      
 
If the template filling finsihed with some kind of error, this returns the value of the error description; otherwise returns an empty string.
- Returns
 - The error description. Will be blank unless GetConversionStatus returns Failure. 
 
 
 
      
        
          | ptrdiff_t pdftron::PDF::TemplateDocument::GetHandleInternal  | 
          ( | 
           | ) | 
           | 
        
      
 
 
      
        
          | UInt32 pdftron::PDF::TemplateDocument::GetNumWarnings  | 
          ( | 
           | ) | 
           const | 
        
      
 
Return the number of warning strings generated during the template filling process. Warning: experimental interface; this method may be renamed or replaced with equivalent functionality in the future.
- Returns
 - The number of stored warning strings. 
 
 
 
      
        
          | UString pdftron::PDF::TemplateDocument::GetTemplateKeysJson  | 
          ( | 
           | ) | 
           | 
        
      
 
 
      
        
          | UString pdftron::PDF::TemplateDocument::GetWarningString  | 
          ( | 
          UInt32  | 
          index | ) | 
           const | 
        
      
 
Retrieve warning strings that have been collected during the template filling process. Warning: experimental interface; this method may be renamed or replaced with equivalent functionality in the future.
- Parameters
 - 
  
    | index | The index of the string to be retrieved. Must be less than GetNumWarnings().  | 
  
   
- Returns
 - The value of the particular warning string. 
 
 
 
      
        
          | bool pdftron::PDF::TemplateDocument::IsCancelled  | 
          ( | 
           | ) | 
           const | 
        
      
 
Has the template filling been cancelled?.
- Returns
 - Returns true if CancelConversion has been called previously. 
 
 
 
      
        
          | TRN_TemplateDocument pdftron::PDF::TemplateDocument::m_impl | 
        
      
 
 
The documentation for this class was generated from the following file: