Show / Hide Table of Contents

Class TemplateDocument

Encapsulates a template document that can merged with data to generate any number of PDFs.

Inheritance
System.Object
TemplateDocument
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: pdftron.PDF
Assembly: PDFNetAndroid.dll
Syntax
public class TemplateDocument : IDisposable

Constructors

TemplateDocument(IntPtr)

Declaration
public TemplateDocument(IntPtr impl_ptr)
Parameters
Type Name Description
System.IntPtr impl_ptr

Methods

CancelConversion()

Cancel the current template filling, forcing FillTemplateJson to return.

Declaration
public void CancelConversion()

CreateInternal(IntPtr)

Declaration
public static TemplateDocument CreateInternal(IntPtr imp)
Parameters
Type Name Description
System.IntPtr imp
Returns
Type Description
TemplateDocument

Destroy()

Declaration
public void Destroy()

Dispose()

Declaration
public void Dispose()

Dispose(Boolean)

Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing

FillTemplateJson(String)

Create a PDF by merging JSON data with this template document.

Declaration
public PDFDoc FillTemplateJson(string json)
Parameters
Type Name Description
System.String json

A JSON dictionary mapping template keys to their replacement content

Returns
Type Description
PDFDoc

The PDFDoc from the template filling result

Finalize()

Declaration
protected void Finalize()

GetConversionStatus()

Get the state of the template filling process.

Declaration
public TemplateDocumentResult GetConversionStatus()
Returns
Type Description
TemplateDocumentResult

GetErrorString()

If the template filling finsihed with some kind of error, this returns the value of the error description; otherwise returns an empty string.

Declaration
public string GetErrorString()
Returns
Type Description
System.String

The error description. Will be blank unless GetConversionStatus returns Failure

GetNumWarnings()

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.

Declaration
public int GetNumWarnings()
Returns
Type Description
System.Int32

The number of stored warning strings

GetTemplateKeysJson()

Get information about the template keys present in the template document. Returns a JSON dictionary following this form: https://www.pdftron.com/api/web/Core.html#.TemplateSchema.

Declaration
public string GetTemplateKeysJson()
Returns
Type Description
System.String

The template keys info JSON dictionary, serialized into a string

GetWarningString(Int32)

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.

Declaration
public string GetWarningString(int index)
Parameters
Type Name Description
System.Int32 index

the index of the string to be retrieved. Must be less than GetNumWarnings()

Returns
Type Description
System.String

The value of the particular warning string

IsCancelled()

Has the template filling been cancelled?.

Declaration
public bool IsCancelled()
Returns
Type Description
System.Boolean

Returns true if CancelConversion has been called previously

Implements

System.IDisposable
In This Article
Back to top Generated by DocFX