SaveSelectedImagesAsMultiPagePDF()

Description

Saves the selected images in buffer as a Multipage PDF file.

Syntax

.SaveSelectedImagesAsMultiPagePDF(fileName, [optionalAsyncSuccessFunc, optionalAsyncFailureFunc]);

Parameters

<string> fileName: specifies the absolute path to save the file.

The following two parameters are optional. If either one exists or both exist, the method is asynchronous, otherwise, it's synchronous.

<OnSuccess function> optional optionalAsyncSuccessFunc: callback function triggered when the file is saved successfully.
<OnFailure function> optional optionalAsyncFailureFunc: callback function triggered when the file failed to be saved.

Please refer to the function prototype OnSuccess or OnFailure.

Return value

Only valid when used synchronously.

bool

true indicates success. false indicates failure.

When false is returned, check ErrorCode or ErrorString for error information.

Remarks

Multi-Page PDF encoding is a built-in feature of Dynamic Web TWAIN, no extra dlls are required.

If you would like to save images by showing the 'Save File' dialog box, you can set IfShowFileDialog to true.

See also

SetSelectedImageIndex
IfShowFileDialog

Example

    DWObject.SelectedImagesCount = 1;
    DWObject.SetSelectedImageIndex(0,0);
    DWObject.SaveSelectedImagesAsMultiPagePDF("C:\\DWT.pdf");