Represents XML form regarding XML Forms Architecture (XFA). More...

Inherits System::Object.

Classes

class  FieldCaption
 Describes field caption More...
 
class  PositionValue
 Class for parsing and recalculation positions, sizes, coordinates in different units (mm, in, pt etc) More...
 

Public Member Functions

ASPOSE_PDF_SHARED_API System::SharedPtr< System::Xml::XmlNodeget_Template ()
 XFA Template component of an XFA form. More...
 
ASPOSE_PDF_SHARED_API System::SharedPtr< System::Xml::XmlNodeget_Form ()
 XFA Form Component of an XFA form. More...
 
ASPOSE_PDF_SHARED_API System::SharedPtr< System::Xml::XmlNodeget_Datasets ()
 XFA Datasets component of an XFA form. More...
 
ASPOSE_PDF_SHARED_API System::SharedPtr< System::Xml::XmlNodeget_Config ()
 XFA Config component of an XFA form. More...
 
ASPOSE_PDF_SHARED_API System::SharedPtr< System::Xml::XmlDocumentget_XDP ()
 XML Data Package (all XFA form components within a surrounding XML container). More...
 
ASPOSE_PDF_SHARED_API System::ArrayPtr< System::Stringget_FieldNames ()
 List of field names in the form template. More...
 
ASPOSE_PDF_SHARED_API System::SharedPtr< System::Xml::XmlNamespaceManagerget_NamespaceManager ()
 Gets the namespace for the XFA form. The following namepsaces are defined: "data" for form data and "tpl" for form template. More...
 
ASPOSE_PDF_SHARED_API System::String idx_get (System::String path)
 Gets of sets data node value according path . More...
 
ASPOSE_PDF_SHARED_API void idx_set (System::String path, System::String value)
 Gets of sets data node value according path . More...
 
ASPOSE_PDF_SHARED_API System::SharedPtr< System::Xml::XmlNodeGetFieldTemplate (System::String fieldName)
 Returns XML node of XFA field tempalte. More...
 
ASPOSE_PDF_SHARED_API System::SharedPtr< System::Xml::XmlNodeListGetFieldTemplates ()
 Returns list of all field templates on XFA form. More...
 
ASPOSE_PDF_SHARED_API void SetFieldImage (System::String fieldName, System::SharedPtr< System::IO::Stream > image)
 Sets image for XFA field. More...
 
- Public Member Functions inherited from System::Object
ASPOSECPP_SHARED_API Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ASPOSECPP_SHARED_API ~Object ()
 Destroys object. Frees all internal data structures. More...
 
ASPOSECPP_SHARED_API Object (Object const &x)
 Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
Objectoperator= (Object const &x)
 Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
ObjectSharedRefAdded ()
 Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int SharedRefRemovedSafe ()
 Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int RemovedSharedRefs (int count)
 Decreases shared reference count by specified value. More...
 
Detail::SmartPtrCounter * WeakRefAdded ()
 Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
void WeakRefRemoved ()
 Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
Detail::SmartPtrCounter * GetCounter ()
 Gets reference counter data structure associated with the object. More...
 
int SharedCount () const
 Gets current value of shared reference counter. More...
 
ASPOSECPP_SHARED_API void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
ASPOSECPP_SHARED_API void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual ASPOSECPP_SHARED_API bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual ASPOSECPP_SHARED_API int32_t GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual ASPOSECPP_SHARED_API String ToString () const
 Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
 
virtual ASPOSECPP_SHARED_API ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual ASPOSECPP_SHARED_API const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual ASPOSECPP_SHARED_API bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual ASPOSECPP_SHARED_API void SetTemplateWeakPtr (uint32_t argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
 
virtual ASPOSECPP_SHARED_API bool FastCast (const Details::FastRttiBase &helper, void **out_ptr) const
 For internal purposes only. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More...
 
template<>
bool Equals (double const &objA, double const &objB)
 Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More...
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 Specialization of Object::ReferenceEquals for case of string and nullptr. More...
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 Specialization of Object::ReferenceEquals for case of strings. More...
 

Protected Member Functions

 XFA (System::SharedPtr< Document > document)
 Initializes new instance of the XFA class. More...
 
 MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION (XFA, CODEPORTING_ARGS(System::SharedPtr< Document > document))
 
bool IsEmpty ()
 
System::SharedPtr< System::Xml::XmlNamespaceManagerGetNamespaceManager ()
 Returns namespace manager with namespaces used for template and data. More...
 
System::SharedPtr< System::Xml::XmlNodeGetFieldNode (System::String path)
 Returns data node for XFA field. More...
 
void BeginCachedUpdates ()
 Start cached updates mode. All changes made to XFA will be cached and saved into document structure at EndCachedUpdates call. This allows to improve preformacne by avoiding redudant operations on saving XML packets into document when a lot of changes to XFA are made. More...
 
void EndCachedUpdates ()
 Ends cahced updates and saves all data into document structure. More...
 
System::SharedPtr< PointGetPageContentArea (System::SharedPtr< Page > page)
 Returns page area position More...
 
System::String GetFieldPath (System::SharedPtr< System::Xml::XmlNode > node)
 
System::SharedPtr< System::Xml::XmlNodeGetForm (System::String path, bool allowCreate)
 
System::SharedPtr< System::Xml::XmlNodeGetNodeByPath (System::String path)
 Returns node by its path. More...
 
System::String GetValueByDataRef (System::String dataRef)
 Returns string value by data reference string. More...
 
void SetValueByDataRef (System::String dataRef, System::String value)
 Sets value by reference string. More...
 
bool HasNode (System::String path)
 
System::SharedPtr< XfaField > GetXfaField (System::String path)
 
System::SharedPtr< System::Xml::XmlNodeListGetBindings ()
 
virtual ASPOSE_PDF_SHARED_API ~XFA ()
 

Static Protected Member Functions

static void FlattenXfaField (System::SharedPtr< System::Xml::XmlNode > field)
 Flatten field of XFA form. More...
 
static void HideXfaField (System::SharedPtr< System::Xml::XmlNode > field)
 

Additional Inherited Members

- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 
- Static Public Member Functions inherited from System::Object
static bool ReferenceEquals (ptr const &objA, ptr const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, T const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, std::nullptr_t)
 Reference-compares value type object with nullptr. More...
 
template<typename T1 , typename T2 >
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares reference type objects in C# style. More...
 
template<typename T1 , typename T2 >
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares value type objects in C# style. More...
 
static const TypeInfoType ()
 Implements C# typeof(System.Object) construct. More...
 

Detailed Description

Represents XML form regarding XML Forms Architecture (XFA).

Constructor & Destructor Documentation

◆ XFA()

Aspose::Pdf::Forms::XFA::XFA ( System::SharedPtr< Document document)
protected

Initializes new instance of the XFA class.

◆ ~XFA()

virtual ASPOSE_PDF_SHARED_API Aspose::Pdf::Forms::XFA::~XFA ( )
protectedvirtual

Member Function Documentation

◆ BeginCachedUpdates()

void Aspose::Pdf::Forms::XFA::BeginCachedUpdates ( )
protected

Start cached updates mode. All changes made to XFA will be cached and saved into document structure at EndCachedUpdates call. This allows to improve preformacne by avoiding redudant operations on saving XML packets into document when a lot of changes to XFA are made.

◆ EndCachedUpdates()

void Aspose::Pdf::Forms::XFA::EndCachedUpdates ( )
protected

Ends cahced updates and saves all data into document structure.

◆ FlattenXfaField()

static void Aspose::Pdf::Forms::XFA::FlattenXfaField ( System::SharedPtr< System::Xml::XmlNode field)
staticprotected

Flatten field of XFA form.

Parameters
fieldXFA form field node.

◆ get_Config()

ASPOSE_PDF_SHARED_API System::SharedPtr<System::Xml::XmlNode> Aspose::Pdf::Forms::XFA::get_Config ( )

XFA Config component of an XFA form.

◆ get_Datasets()

ASPOSE_PDF_SHARED_API System::SharedPtr<System::Xml::XmlNode> Aspose::Pdf::Forms::XFA::get_Datasets ( )

XFA Datasets component of an XFA form.

◆ get_FieldNames()

ASPOSE_PDF_SHARED_API System::ArrayPtr<System::String> Aspose::Pdf::Forms::XFA::get_FieldNames ( )

List of field names in the form template.

◆ get_Form()

ASPOSE_PDF_SHARED_API System::SharedPtr<System::Xml::XmlNode> Aspose::Pdf::Forms::XFA::get_Form ( )

XFA Form Component of an XFA form.

◆ get_NamespaceManager()

ASPOSE_PDF_SHARED_API System::SharedPtr<System::Xml::XmlNamespaceManager> Aspose::Pdf::Forms::XFA::get_NamespaceManager ( )

Gets the namespace for the XFA form. The following namepsaces are defined: "data" for form data and "tpl" for form template.

◆ get_Template()

ASPOSE_PDF_SHARED_API System::SharedPtr<System::Xml::XmlNode> Aspose::Pdf::Forms::XFA::get_Template ( )

XFA Template component of an XFA form.

◆ get_XDP()

ASPOSE_PDF_SHARED_API System::SharedPtr<System::Xml::XmlDocument> Aspose::Pdf::Forms::XFA::get_XDP ( )

XML Data Package (all XFA form components within a surrounding XML container).

◆ GetBindings()

System::SharedPtr<System::Xml::XmlNodeList> Aspose::Pdf::Forms::XFA::GetBindings ( )
protected

◆ GetFieldNode()

System::SharedPtr<System::Xml::XmlNode> Aspose::Pdf::Forms::XFA::GetFieldNode ( System::String  path)
protected

Returns data node for XFA field.

Parameters
pathField path
Returns
Field node.

◆ GetFieldPath()

System::String Aspose::Pdf::Forms::XFA::GetFieldPath ( System::SharedPtr< System::Xml::XmlNode node)
protected

◆ GetFieldTemplate()

ASPOSE_PDF_SHARED_API System::SharedPtr<System::Xml::XmlNode> Aspose::Pdf::Forms::XFA::GetFieldTemplate ( System::String  fieldName)

Returns XML node of XFA field tempalte.

Parameters
fieldNamePath of the field which template must be found.
Returns
XL node with field template.

◆ GetFieldTemplates()

ASPOSE_PDF_SHARED_API System::SharedPtr<System::Xml::XmlNodeList> Aspose::Pdf::Forms::XFA::GetFieldTemplates ( )

Returns list of all field templates on XFA form.

Returns
List of field templates.

◆ GetForm()

System::SharedPtr<System::Xml::XmlNode> Aspose::Pdf::Forms::XFA::GetForm ( System::String  path,
bool  allowCreate 
)
protected

◆ GetNamespaceManager()

System::SharedPtr<System::Xml::XmlNamespaceManager> Aspose::Pdf::Forms::XFA::GetNamespaceManager ( )
protected

Returns namespace manager with namespaces used for template and data.

Returns

◆ GetNodeByPath()

System::SharedPtr<System::Xml::XmlNode> Aspose::Pdf::Forms::XFA::GetNodeByPath ( System::String  path)
protected

Returns node by its path.

Parameters
path
Returns

◆ GetPageContentArea()

System::SharedPtr<Point> Aspose::Pdf::Forms::XFA::GetPageContentArea ( System::SharedPtr< Page page)
protected

Returns page area position

Parameters
pagePDF page (to get UserUnits value)
Returns

◆ GetValueByDataRef()

System::String Aspose::Pdf::Forms::XFA::GetValueByDataRef ( System::String  dataRef)
protected

Returns string value by data reference string.

Parameters
dataRefData reference string.
Returns
Value

◆ GetXfaField()

System::SharedPtr<XfaField> Aspose::Pdf::Forms::XFA::GetXfaField ( System::String  path)
protected

◆ HasNode()

bool Aspose::Pdf::Forms::XFA::HasNode ( System::String  path)
protected

◆ HideXfaField()

static void Aspose::Pdf::Forms::XFA::HideXfaField ( System::SharedPtr< System::Xml::XmlNode field)
staticprotected

◆ idx_get()

ASPOSE_PDF_SHARED_API System::String Aspose::Pdf::Forms::XFA::idx_get ( System::String  path)

Gets of sets data node value according path .

Parameters
pathData node path, e.g. form1[0].Subform1[0].Subform2[0].Subform3[0].TextField[0]. Be sure to include indices even if data contains only single occurences of each nodes, i.e. write node1[0].node2[0]... instead of node1.node2...
Returns
Data node value.

◆ idx_set()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Forms::XFA::idx_set ( System::String  path,
System::String  value 
)

Gets of sets data node value according path .

Parameters
pathData node path, e.g. form1[0].Subform1[0].Subform2[0].Subform3[0].TextField[0]. Be sure to include indices even if data contains only single occurences of each nodes, i.e. write node1[0].node2[0]... instead of node1.node2...
valueData node value.

◆ IsEmpty()

bool Aspose::Pdf::Forms::XFA::IsEmpty ( )
protected

◆ MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION()

Aspose::Pdf::Forms::XFA::MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION ( XFA  ,
CODEPORTING_ARGS(System::SharedPtr< Document > document)   
)
protected

◆ SetFieldImage()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Forms::XFA::SetFieldImage ( System::String  fieldName,
System::SharedPtr< System::IO::Stream image 
)

Sets image for XFA field.

Parameters
fieldNameName of the field.
imageStream which contains image.

◆ SetValueByDataRef()

void Aspose::Pdf::Forms::XFA::SetValueByDataRef ( System::String  dataRef,
System::String  value 
)
protected

Sets value by reference string.

Parameters
dataRefData reference string
valueValue