InsertDocumentPack

Use the command InsertDocumentPack to add or replace an alternative format document into the active Document Pack.

The command InsertDocumentPack fails if there is no active Document Pack in the session.

Syntax

InsertDocumentPack
	     Document (<text>)
     	Type (<text>)
	     Slot (<text>)
	     Channel (<text>)
     	Flags (<text>);

Parameters

  • Document: Required. Specifies the file that is inserted or replaced in the Document Pack. This file must be located under the Data subdirectory of the directory indicated by the _document_pack constant.
  • Type: Required. Specifies the file type for the document.
  • Slot: Required. Indicates the slot in the Document Pack that is inserted or replaced. It is only possible to insert files into an existing slot.
  • Channel: Optional. Indicates that the file is to be inserted into a specific channel exception for the slot. This channel exception must already be present in the Document Pack. If this parameter is omitted or empty, the file is inserted in the default channel.
  • Flags: Optional. Specifies the flags for the alternative.

The command InsertDocumentPack uses the Slot and Channel values to identify the document in the Document Pack. It is not possible to introduce new slots or channel exceptions.

If the document is found alternatives are matched based on the Type and Flags values. If there is already an alternative with these attributes, it is replaced. Otherwise, a new alternative is added to the slot.

The command InsertDocumentPack must be used to change the manifest when an entry should refer to a new document. If the document is changed locally, such as when applying a macro or securing a PDF file, it is not necessary to update the manifest.