Inserts a new page into a multi-page document.
Visual Basic |
---|
Public Sub InsertPage( _ ByVal sourceFile As String, _ ByVal destFile As String, _ ByVal PageNbr As Long _ ) |
- sourceFile
- A string which represents the TIFF or EXIF file containing a page to be inserted into the TIFF file.
- destFile
- The name of the destination file, which will include the inserted page.
- PageNbr
The 1-indexed page number before which the new page should be inserted.
Note that the value of this argument will not cause any sort of validation error. The following rules apply:
- A value of 0 will be treated the same as a value of 1 (that is, the page will be inserted at the beginning of the document).
- A negative value will cause the page to be inserted at the end of the document.
- A positive value greater than the number of pages will also cause the page to be inserted at the end of the document.
- The maximum page number supported is 65535.
This method is for TIFF and EXIF file formats.
- If an invalid format is specified for the source or destination files then an IX_Error_InvalidFormat error will be returned.
- A page number less than 0 will cause an IX_Error_InvalidPage error to be returned.
- A page number greater than 65535 will be treated as the maximum value of 65535.
- A page number greater than the number of pages in the destination file will result in the page being added to the end of the destination image file.
- If the destination file is read-only or in-use then an IX_Error_FileOpen error will be returned.
- This method does not work for some particular TIFF types, like IX_ImageType_Tiff_Jpeg and IX_ImageType_Tiff_Lzw.
Note: Available in Professional edition.