1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
|
Boolean bFeeder bDuplex
String sFileName sPaperSize
Boolean bRetValInteger iRetVal iImage iTwainState
Handle hImageObject
Get Checked_State of oCBFeeder to bFeeder
Get Checked_State of oCBDuplex to bDuplex
Get Value of oFormFileName to sFileName
Get Value of oComboFormPaperSize to sPaperSize Move (oComImaging(Self)) to hImageObject
Get ComTwainOpenDefaultSource of oComImaging to bRetVal
Get ComTwainSetCurrentPixelType of oComImaging OLETWPT_RGB to bRetVal
Get ComTwainEnableDuplex of oComImaging bDuplex to bRetVal
If (sPaperSize = "DIN A4" ) Get ComTwainSetPaperSize of oComImaging OLEA4LETTER to bRetVal
If (sPaperSize = "DIN A5" ) Get ComTwainSetPaperSize of oComImaging OLEA5 to bRetVal
Get ComTwainSetAutoFeed of oComImaging bFeeder to bRetVal
Get ComTwainSetAutoScan of oComImaging bFeeder to bRetVal
Send ComTwainSetHideUI of oComImaging True
Get ComTwainPdfStartEx of oComImaging sFileName "" "" "" "" "" 0 -1 "" "" to iRetVal
Repeat
Get ComTwainAcquireToGdPictureImage of oComImaging hImageObject to iImage
If (iImage) Begin
Get ComTwainAddGdPictureImageToPdf of oComImaging iImage to iRetVal
Get ComCloseImage of oComImaging iImage to iRetVal
End
Get ComTwainGetState of oComImaging to iTwainState
Until ( iTwainState <= 5)
Get ComTwainPdfStop of oComImaging to iRetVal
Get ComTwainCloseSource of oComImaging to iRetVal
|