IDocument¶
- class IDocument¶
Bases:
ImpactCOMWrapperBase- Description:
Represents a document.
- Remarks:
The IDocument object represents a single version of a document in the document repository. Each document in the document repository has a unique ID property, every document that is related by version has the same series_id property. The document repository provides a mechanism for updating documents that involves a Checkout/Checkin mechanism. When a document is checked out a new document with a unique ID property and matching series_id property is created. The checked out document is known as a Private Working Copy (PWC). You can only perform operations such as updating the file data using update_from, updating Values, modifying Tags or setting other properties on the PWC document. You can then commit those changes using the Checkin method. The PWC document is not visible to other users and cannot be located by the IDocumentSearch object. It may be possible to modify Tags for a document that is not the PWC document, check the supports_tagging_checked_out_documents_only property. The IDocumentType is the intrinsic type that is allocated to each document when it is added to the document repository. Once a document has been created with a specific type that type cannot be changed. The IDocumentMIMEType is automatically assigned to each document when it is added based on the file extension of the document file. The MIME type is used to generate thumbnail images and extract meta-data values from the file. The IDocumentGroup can be used to group documents by categorisng them as required. Documents can be deleted from the document repository using the Delete method, and may be Undeleted, Purged or Obliterated.
Wraps a COM object or another wrapper instance. Accepts: - A valid impact_object - An existing impact_com_wrapper_base-derived instance
- property active_checkout¶
Gets active_checkout.
- Description:
The PWC document of a document series.
- Remarks:
Only a single document in a document series can be the PWC document. The active_checkout document is created when the Checkout method is called for the latest document version. Use is_active_checkout to determine if this document is the PWC document in a document series. Introduced in Impact 9.0.0.83.
- Returns:
The value of active_checkout.
- Return type:
- property active_user¶
Gets active_user.
- Description:
Returns an IUser object representing the documents active user.
- Remarks:
For any document this property returns the user that checked out the document series. Use is_active_checkout to determine if this document is the PWC document in a document series. In Impact 2015 this property can no longer be set and will result in an error. Insetad you must use the Checkout/Checkin methods.
- Returns:
The value of active_user.
- Return type:
- Examples:
- property added_by¶
Gets added_by.
- Description:
Returns an IUser object representing the user who added the document.
- Remarks:
All documents in a document series share the same added_by value.
- property added_date_time¶
Gets added_date_time.
- Description:
The date and time the document was added.
- Remarks:
All documents in a document series share the same added_date_time value.
- Returns:
The value of added_date_time.
- Return type:
added_date_time (datetime)
- property all_versions¶
Gets all_versions.
- Description:
Gets all IDocument’s in this document series.
- Remarks:
The returned IDocuments collection contains all IDocument’s in this document series always ordered latest document version to oldest document version. The IDocumentContext is ignored when using all_versions. Introduced in Impact 9.0.0.83.
- Returns:
The value of all_versions.
- Return type:
- Examples:
- property all_versions_size¶
Gets all_versions_size.
- Description:
The total document file data size in bytes of all IDocument’s in this document series.
- Remarks:
The Int64 data type may not be supported in all development environments. Specifically Int64 is not support in VBScript, you can use the all_versions_size_as_string instead. Introduced in Impact 10.0.0.68
- Returns:
The value of all_versions_size.
- Return type:
all_versions_size (int)
- property all_versions_size_as_string¶
Gets all_versions_size_as_string.
- Description:
The total document file data size of all IDocument’s in this document series as a string.
- Remarks:
Introduced in Impact 10.0.0.68
- Returns:
The value of all_versions_size_as_string.
- Return type:
- property can_cancel_checkout¶
Gets can_cancel_checkout.
- Description:
Determines if the can_cancel_checkout method can be called for this document.
- Remarks:
Introduced in Impact 9.0.0.83.
- Returns:
The value of can_cancel_checkout.
- Return type:
can_cancel_checkout (bool)
- property can_checkin¶
Gets can_checkin.
- Description:
Determines if the Checkin method can be called for this document.
- Remarks:
Introduced in Impact 9.0.0.83.
- Returns:
The value of can_checkin.
- Return type:
can_checkin (bool)
- property can_checkout¶
Gets can_checkout.
- Description:
Determines if the Checkout method can be called for this document.
- Remarks:
Introduced in Impact 9.0.0.83.
- Returns:
The value of can_checkout.
- Return type:
can_checkout (bool)
- property can_delete¶
Gets can_delete.
- Description:
Determines if the Delete method can be called for this document.
- Remarks:
Introduced in Impact 9.0.0.83.
- Returns:
The value of can_delete.
- Return type:
can_delete (bool)
- property can_make_current¶
Gets can_make_current.
- Description:
Determines if the make_current method can be called for this document.
- Remarks:
Introduced in Impact 10.0.0.68.
- Returns:
The value of can_make_current.
- Return type:
can_make_current (bool)
- property can_obliterate¶
Gets can_obliterate.
- Description:
Determines if the Obliterate method can be called for this document.
- Remarks:
Introduced in Impact 9.0.0.83.
- Returns:
The value of can_obliterate.
- Return type:
can_obliterate (bool)
- property can_purge¶
Gets can_purge.
- Description:
Determines if the Purge method can be called for this document.
- Remarks:
Introduced in Impact 9.0.0.83.
- Returns:
The value of can_purge.
- Return type:
can_purge (bool)
- property can_revert_to¶
Gets can_revert_to.
- Description:
Determines if the revert_to method can be called for this document.
- Remarks:
Introduced in Impact 10.0.0.68.
- Returns:
The value of can_revert_to.
- Return type:
can_revert_to (bool)
- property can_undelete¶
Gets can_undelete.
- Description:
Determines if the Undelete method can be called for this document.
- Remarks:
Introduced in Impact 9.0.0.83.
- Returns:
The value of can_undelete.
- Return type:
can_undelete (bool)
- property can_update¶
Gets can_update.
- Description:
Determines if the update methods can be called for this document.
- Remarks:
When the can_update property is true the update_from and update_from_stream methods can be used, and the Values and Tags properties can be updated. When the can_update property is false the document is read-only. Introduced in Impact 9.0.0.83.
- Returns:
The value of can_update.
- Return type:
can_update (bool)
- property comment¶
Gets Comment.
- Description:
The comment associated with the document.
- Remarks:
In versions prior to Impact 2015 the comment was stored in the DOCUMENT.DC_COMMENT but this is now used to store the Description property when using the Impact document provider. In Impact 2015 and later the Comment property can be used to read/write the last check in comment for the IDocument object. The set operation will fail if IDocumentSettings.supports_changing_history_item_details is false.
- Returns:
The value of Comment.
- Return type:
comment (str)
- property customer¶
Gets Customer.
- Description:
The ICustomer object associated with this document.
- Remarks:
This property has been deprecated in Impact 2015. Instead you should use the Relationships and series_relationships properties. In Impact 2015 this property may return the first ICustomer associated with this document - but this is not guaranteed.
- property data_stream_updated¶
Gets data_stream_updated.
- Description:
Determines if the data stream has been updated.
- Remarks:
For a PWC document this property determines if the file data stream has been updated using update_from or update_from_stream. This method will fail if called for a non-PWC document. Introduced in Impact 9.0.0.83.
- Returns:
The value of data_stream_updated.
- Return type:
data_stream_updated (bool)
- property database_item¶
Gets database_item.
- Description:
The IDatabaseItem object associated with this document.
- Remarks:
This property has been deprecated in Impact 2015. Instead you should use the Relationships and series_relationships properties. In Impact 2015 this property may return the first IDatabaseItem associated with this document - but this is not guaranteed.
- Returns:
The value of database_item.
- Return type:
- property description¶
Gets Description.
- Description:
The description of the document.
- Remarks:
The Description property is read-only however you can update the description of a PWC document using the Values property and the dkcDescription document column. Introduced in Impact 9.0.0.83.
- Returns:
The value of Description.
- Return type:
description (str)
- property documents¶
Gets Documents.
- Description:
Gets all IDocument’s with a relationship to this document.
- Remarks:
Introduced in Impact 9.0.0.83.
- Returns:
The value of Documents.
- Return type:
- property extension¶
Gets Extension.
- Description:
The extension of the document.
- Remarks:
Introduced in Impact 9.0.0.83.
- Returns:
The value of Extension.
- Return type:
extension (str)
- property extracted_meta_data¶
Gets extracted_meta_data.
- Description:
The meta-data that was automatically extracted.
- Remarks:
After using the update_from method the extracted_meta_data property will return a collection of key/value pairs containing all the automatically extracted meta-data. This property will return null if the update_from method has not been called. If you want to extract meta-data from any local file you can use the IDocumentMetaExtractor.extract_meta_data method directly. Introduced in Impact 9.0.0.83.
- Returns:
The value of extracted_meta_data.
- Return type:
- property file_name¶
Gets file_name.
- Description:
Generates a file name for the document.
- Remarks:
The file name generated is based on the Name, Version and Extension properties. The file name takes the form ‘[name]_[version].[extension]’ and is useful for emailing or saving the document file data externally. The file name does not include any file path. Introduced in Impact 9.0.0.83.
- Returns:
The value of file_name.
- Return type:
file_name (str)
- property group¶
Gets Group.
- Description:
The group of the document.
- Remarks:
Document groups provide a mechanism for categorising similar documents into a folder like structure. Document groups provide only a single level of grouping and are not hierarchical. Setting the Group property will fail if not called for a PWC document. The group rules defined by default_extensions and allow_all_extensions and not validated when settings a group. It is the callers responsiblity to enforce those rules if required. Introduced in Impact 9.0.0.83.
- Returns:
The value of Group.
- Return type:
- property has_data_stream¶
Gets has_data_stream.
- Description:
Determines if the document has a file data stream.
- Remarks:
Documents that have been data purged will not contain a file data stream. Introduced in Impact 9.0.0.83.
- Returns:
The value of has_data_stream.
- Return type:
has_data_stream (bool)
- property history¶
Gets History.
- Description:
An IDocumentHistory collection representing all the operations performed on this document.
- Remarks:
The History collection only contains operations performed on this specific document version. To retrieve operations performed on all documents versions use the series_history property instead.
- Returns:
The value of History.
- Return type:
- property id¶
Gets ID.
- Description:
The unique identifier of the document.
- Remarks:
The format of the unique identifier is document provider dependant you cannot rely on the ID being a specify format. The value may or may not be equavalent to a GUID. Introduced in Impact 9.0.0.83.
- Returns:
The value of ID.
- Return type:
id (str)
- property is_active_checkout¶
Gets is_active_checkout.
- Description:
Determines if this document is the PWC document for this document series.
- Remarks:
Only a single document in a document series can be the PWC document. Use the active_checkout property to get the PWC document of this document series if required. Introduced in Impact 9.0.0.83.
- Returns:
The value of is_active_checkout.
- Return type:
is_active_checkout (bool)
- property is_checked_out¶
Gets is_checked_out.
- Description:
Determines if the latest series document is checked out.
- Remarks:
The is_checked_out property can be used for any document version in a series to determine if the latest document is checked out. Introduced in Impact 9.0.0.83.
- Returns:
The value of is_checked_out.
- Return type:
is_checked_out (bool)
- property is_latest_version¶
Gets is_latest_version.
- Description:
Determines if this document is the latest document version of a series.
- Remarks:
Only a single document in a document series can be the latest version. A PWC document is not considered the latest version until after it has been checked in. Use the latest_version property to get the latest version document if required. Introduced in Impact 9.0.0.83.
- Returns:
The value of is_latest_version.
- Return type:
is_latest_version (bool)
- property key¶
Gets Key.
- Description:
The key of the document.
- Remarks:
This property has been deprecated. Each document can always be uniquely identified by the IDocument.id property. However some document providers may also provider a unique IDocument.key integer property for each document. To determine if the Key property can be used see IDocumentSettings.supports_document_key. It is recommended to always use the IDocument.id property if possible.
- Returns:
The value of Key.
- Return type:
key (int)
- property latest_version¶
Gets latest_version.
- Description:
The latest document version of a document series.
- Remarks:
Use is_latest_version to determine if this document is the latest version in a document series. Introduced in Impact 9.0.0.83.
- Returns:
The value of latest_version.
- Return type:
- property mime_type¶
Gets mime_type.
- Description:
The MIME type of the document.
- Remarks:
The IDocumentMIMEType is automatically assigned to each document when it is added based on the file extension of the document file. The MIME type is used to generate thumbnail images and extract meta-data values from the file. The mime_type cannot be changed after a document has been created. Introduced in Impact 9.0.0.83.
- Returns:
The value of mime_type.
- Return type:
- property modified_by¶
Gets modified_by.
- Description:
The user that last modified this document.
- Returns:
The value of modified_by.
- Return type:
- property modified_date_time¶
Gets modified_date_time.
- Description:
The date and time that this item was last modified.
- Returns:
The value of modified_date_time.
- Return type:
modified_date_time (datetime)
- property name¶
Gets Name.
- Description:
The name of the document that this object represents.
- Remarks:
The document name never contains a path only a file name with extension.
- Returns:
The value of Name.
- Return type:
name (str)
- property relationships¶
Gets Relationships.
- Description:
An IDocumentRelationships collection representing all the relationships between this document and other objects.
- Remarks:
Introduced in Impact 9.0.0.83.
- Returns:
The value of Relationships.
- Return type:
- property revision¶
Gets Revision.
- Description:
The revision number of the document this object represents.
- Remarks:
In Impact 2015 this property returns the major revision number of a document version. You should consider using the Version property instead. In Impact 2015 this property can no longer be set and will result in an error. To increment a document version you must use the Checkout/Checkin methods.
- Returns:
The value of Revision.
- Return type:
revision (int)
- property series_history¶
Gets series_history.
- Description:
An IDocumentHistory collection representing all the operations performed on this document series.
- Remarks:
The series_history collection contains all operations performed on all documents in this document series. To retrieve operations performed only on this specific document versions use the History property instead. Introduced in Impact 9.0.0.83.
- Returns:
The value of series_history.
- Return type:
- Examples:
- property series_id¶
Gets series_id.
- Description:
The unique series identifier of the document.
- Remarks:
Every document that is related by version has the same series_id property. Introduced in Impact 9.0.0.83.
- Returns:
The value of series_id.
- Return type:
series_id (str)
- property series_relationships¶
Gets series_relationships.
- Description:
An IDocumentRelationships collection representing all the relationships between this document series and other objects.
- Remarks:
The series_relationships collection includes all relationships between all documents in the series and other objects. Use the IDocumentRelationship.document_latest_version property to determine if the relationship is for a specific document version or for the latest document version. Introduced in Impact 9.0.0.83.
- Returns:
The value of series_relationships.
- Return type:
- Examples:
- property size¶
Gets Size.
- Description:
The document file data size in bytes.
- Returns:
The value of Size.
- Return type:
size (int)
- property size_as_string¶
Gets size_as_string.
- Description:
The document file data size as a string.
- Remarks:
Introduced in Impact 9.0.0.83.
- Returns:
The value of size_as_string.
- Return type:
size_as_string (str)
- property status¶
Gets Status.
- Description:
The status of the document.
- Remarks:
The status of a document changes as documents are deleted, undeleted, or purged. Introduced in Impact 9.0.0.83.
- Returns:
The value of Status.
- Return type:
- property tags¶
Gets Tags.
- Description:
The managed tags associated with this document.
- Remarks:
The Tags property provides an object that can be used to add or update the IDocumentTag objects associated with a PWC document. It may be possible to modify Tags for a document that is not the PWC document, check the supports_tagging_checked_out_documents_only property. Introduced in Impact 9.0.0.83.
- Returns:
The value of Tags.
- Return type:
- property type¶
Gets Type.
- Description:
The document type of the document.
- Remarks:
The IDocumentType is the intrinsic type that is allocated to each document when it is added to the document repository. Once a document has been created with a specific type that Type cannot be changed. The IDocumentType.columns property determines the appropriate IDocumentColumn’s for the document type. Introduced in Impact 9.0.0.83.
- Returns:
The value of Type.
- Return type:
- property used_in_image¶
Gets used_in_image.
- Description:
Indicates if the document that this object represents is being used in an image entity.
- Remarks:
This property has been deprecated in Impact 2015. Instead you should use the Relationships or series_relationships properties. Using this method will result in an error.
- Returns:
The value of used_in_image.
- Return type:
used_in_image (bool)
- Examples:
- property used_in_projects¶
Gets used_in_projects.
- Description:
Retrieves an array of all IDatabaseItems representing the projects the document is being used in.
- Remarks:
This property has been deprecated in Impact 2015. Instead you should use the Relationships or series_relationships properties. Using this method will result in an error.
- Returns:
The value of used_in_projects.
- Return type:
used_in_projects (any)
- property values¶
Gets Values.
- Description:
An IDatabaseValues object that can be used to read/write documents column values.
- Remarks:
The Values property is a read-only collection of document column values for non-PWC documents. For a PWC document the Values property can be used to update document values. In Impact 2014 and earlier the Values object could be used to directly read/write database values. This operation is not supported in Impact 2015 and later. You must use a PWC document to modify any required document values.
- Returns:
The value of Values.
- Return type:
- property version¶
Gets Version.
- Description:
The version number of this document.
- Remarks:
To increment a document version you must use the Checkout/Checkin methods. Introduced in Impact 9.0.0.83.
- cancel_checkout()¶
- Description:
Cancels the checkout of a document.
- Remarks:
This method can only be used for a PWC document. Cancelling the checkout of a PWC document obliterates all traces of the PWC document from the document repository. The operation cannot be undone. Check the can_cancel_checkout property to determine if this document can be un-checked out. Introduced in Impact 9.0.0.83.
- checkin(version, comments)¶
- Description:
Check in the changes made to a document.
- Remarks:
This method can only be used for a PWC document. Perform operations such as updating the file data using update_from, updating Values, modifying Tags or setting other properties on the PWC document. These changes are persisted to the document repository in a temporary document so these operations can be performed over a period of time if required. Finally commit those changes using the Checkin method. After committing the changes the new document version becomes visible to all other users and can be located using the IDocumentSearch object. After calling Checkin it is not guaranteed that the ID property will be retained by the document repository. After check in use the latest_version property to retrieve the IDocument that was saved in the document repository. Check the can_checkin property to determine if this document can be checked in. Check supports_major_and_minor_versions to determine if using dvMinor for the Version is appropriate. Introduced in Impact 9.0.0.83.
- Parameters:
version (ipDocumentVersion) – Determines if the new document version is a major or minor version update.
comments (str) – Optional comments that will added to IDocumentHistoryItem.details when the document is checked in.
- checkout()¶
- Description:
Checks out a document so it can be modified.
- Remarks:
This method can only be used for the latest document version of a document series. When a document is checked out a new document with a unique ID property and matching series_id property is created. The checked out document is known as a Private Working Copy (PWC). When a PWC document already exists for the current user or another user this method fails. Use the is_checked_out or the active_checkout property to determine a PWC document already exists. After check out use the active_checkout property to retrieve the PWC IDocument to perform update operations on. Commit changes to the PWC document using the Checkin method. The PWC document is not visible to other users and cannot be located by the IDocumentSearch object. Check the can_checkout property to determine if this document can be checked out. Introduced in Impact 9.0.0.83.
- copy_to(file_name)¶
- Description:
Copies the document to a specific location.
- Remarks:
If the destination file already exists it will be overwritten.
- Parameters:
file_name (str) – The full path of the destination file.
- Examples:
- copy_to_stream()¶
- Description:
Copies the document to a stream.
- Returns:
This method returns an IUnknown interface but the interface also supports the IStream interface.
- delete()¶
- Description:
Deletes the document.
- Remarks:
Deletes the document from the document repository. Most document repositories will not permanently delete a document but change the document Status property. To delete multiple documents from the document series you can use set the IDocumentContext.documents_to_process property before calling this method. Check the can_delete property to determine if this document can be deleted. Once a document has been deleted the document repository may support Undeleting, Purging or Obliterating the document.
- get_cached_file()¶
- Description:
Gets a cached file for the document.
- Remarks:
This method gets the document data file from the document repository and saves it to a unique file path in the workstation temporary files folder. Introduced in Impact 9.0.0.83.
- Returns:
If a cached file cannot be created then this method returns false.
- get_thumbnail_file(page, width, height)¶
- Description:
Gets a thumbnail image file for the document.
- Remarks:
If the Page parameter falls outside the page range this method fails. Use the get_thumbnails_begin/get_thumbnails_end methods if you are generating more the one thumbnail image size for this document. Thumbnails for documents can be generated from several sources in the following order. When the document has an associated mime_type and the MIME type has a thumbnail_generator then the thumbnail generator will be used to generate a thumbnail based on the contents of the document. When the document has an associated mime_type and the MIME type has a static thumbnail image assigned (in any size) then the most appropriate size is used and resized as appropriate. If the default MIME type has a static thumbnail image assigned (in any size) then the most appropriate size is used and resized as appropriate. Once a thumbnail image has been generated it is cached in the documents_cached_folder using a unique name based on the document ID and size. The documents_cache_folder is typically a network folder that is shared between Impact and nServer installations. Introduced in Impact 9.0.0.83.
- Parameters:
page (int) – The page number within the document the thumbnail should be generated for.
width (int) – The width in pixels of the thumbnail image required.
height (int) – The height in pixels of the thumbnail image required.
- get_thumbnail_stream(page, width, height)¶
- Description:
Gets a thumbnail image stream for the document.
- Remarks:
If the Page parameter falls outside the page range this method fails. Use the get_thumbnails_begin/get_thumbnails_end methods if you are generating more the one thumbnail size for this document.Introduced in Impact 9.0.0.83.
- Returns:
This method returns an IUnknown interface but the interface also supports the IStream interface.
- Parameters:
page (int) – The page number within the document the thumbnail should be generated for.
width (int) – The width in pixels of the thumbnail image required.
height (int) – The height in pixels of the thumbnail image required.
- get_thumbnails_begin(transparent_to_colour_r_g_b)¶
- Description:
Begins the generation of multiple thumbnail images.
- Remarks:
You must match each call of get_thumbnail_begin with a corresponding call to get_thumbnail_end. Introduced in Impact 9.0.0.83.
- Parameters:
transparent_to_colour_rgb (int) – The RGB background colour to replace any thumbnail transparency.
- get_thumbnails_end()¶
- Description:
Ends the generation of multiple thumbnail images.
- Remarks:
You must match each call of get_thumbnail_end with a previous call to get_thumbnail_begin. Introduced in Impact 9.0.0.83.
- make_current(version, comments)¶
- Description:
Makes a previous document version the latest document version.
- Remarks:
This method checks out the latest IDocument in this document series. This method then updates the Private Working Copy (PWC) with the document file and data from this document version. Finally this method checks in the IDocument generating a new document version which is an exact copy of this document. After using make_current use the latest_version property to retrieve the IDocument that was saved in the document repository. The revert_to method can be used to revert the latest document to a specific document version. Check the can_make_current property to determine if this document can be made current. Check supports_major_and_minor_versions to determine if using dvMinor for the Version is appropriate. Introduced in Impact 10.0.0.68.
- Parameters:
version (ipDocumentVersion) – Determines if the new document version is a major or minor version update.
comments (str) – Optional comments that will added to IDocumentHistoryItem.details when the document is made current.
- obliterate()¶
- Description:
Obliterates a document.
- Remarks:
The Obliterate method permanently removes all traces of the document from the document repository. Obliterating a document also removes all document relationships. To obliterate multiple documents from the document series you can use set the IDocumentContext.documents_to_process property before calling this method. Check the IDocumentSettings.supports_obliterate property to detemine if the document repository supports document obliterate. Check the can_obliterate property to determine if this document can be obliterated. Introduced in Impact 9.0.0.83.
- purge()¶
- Description:
Purges the file data from the document.
- Remarks:
Purges the file data from the document in the document repository. The purge operation clears the actual file data (the document file) but retains all the document column values and meta-data. The purge operation is useful to reduce the storage requirements for old documents that may no longer be required. The document repository will also change the document Status property to dsDataPurged. A document that has been purged can no longer be Undeleted. To purge multiple documents from the document series you can use set the IDocumentContext.documents_to_process property before calling this method. Check the IDocumentSettings.supports_data_purge property to detemine if the document repository supports document purging. Check the can_purge property to determine if this document can be purged. Introduced in Impact 9.0.0.83.
- refresh()¶
- Description:
Refresh the document information from the database.
- revert_to()¶
- Description:
Reverts the latest document to a previous document version.
- Remarks:
This method reverts the latest IDocument in this document series to this specific document version. This method is destructive in that it permanently deletes and obliterates all traces of document versions that are older than this document version. After using revert_to this document will be the latest_version for this document series in the document repository. To retain older versions of this document you should use the mare_current method instead. Check the IDocumentSettings.supports_revert_to property to detemine if the document repository supports reverting to specific document versions. Check the can_revert_to property to determine if this specific document can be reverted to. Introduced in Impact 10.0.0.68.
- undelete()¶
- Description:
Undeletes a previously deleted document.
- Remarks:
To undelete multiple documents from the document series you can use set the IDocumentContext.documents_to_process property before calling this method. Check the IDocumentSettings.supports_undelete property to detemine if the document repository supports document undeleting. Check the can_undelete property to determine if this document can be undeleted. Introduced in Impact 9.0.0.83.
- update_from(file_name)¶
- Description:
Update the document from a specified file.
- Remarks:
The file extension should match the existing document name, if it doesn’t this method will fail. The update_from method will fail if not called for a PWC document. After calling update_from the extracted_meta_data property can be used to retrieve any meta-data values that were automatically extracted from the file data contents.
- Parameters:
file_name (str) – The full path of the file to update the document with.
- Examples:
- update_from_stream(stream, file_name, chunk_size)¶
- Description:
Update the document from a specified stream.
- Remarks:
The update_from_stream method will fail if not called for a PWC document. It is recommended to use the update_from method rather than update_from_stream in Impact 2015 to ensure that any configured meta-data extractors are called.
- Parameters:
stream (win32com.client.Dispatch) – Specifies the stream to update from. The IUnknown interface passed here must support the IStream interface.
file_name (str) – Specifes the file name used to identify the document.
chunk_size (int) – Specifies the number of bytes to read for each sequential access to the specified stream. This value must be between 1K (1024 bytes) and 1MB (1048576 bytes), if a value is specified outside this range then the actual value used will be modified to fit into the range.
- Examples: