DTwainSource::EnumPaperSizes |
Top Previous Next |
Syntax bool DTwainSource::EnumPaperSizes( DTwainLongArray& Array ) const;
Parameters Array Array that will store the supported paper sizes
Return Value true if successful, false otherwise.
Comments This function returns a DTwainLongArray that denotes all of the supported paper sizes of the Source. See cdtenum.h for all of the supported paper sizes.
Example:
#include <cdtwain.h> #include <iostream>
using namespace DTWAIN; using namespace std;
int main( ) { // Initialize DTWAIN DTwainInterface TI( NULL, NULL ); DTwainLongArray PaperSizes;
// select the default Source and get the paper sizes that are available (this chained // function assumes that the default source exists, can be selected, and will open // successfully DTwainSource::SelectDefault( ).EnumPaperSizes( PaperSizes );
// output all paper sizes to the console for (int i = 0; i < PaperSizes.size( ); ++i ) cout << "Paper size " << i << " is " << PaperSizes[i] << endl; } |