@@ -146,6 +146,8 @@ export class DwtService {
146146 */
147147 private fileSavingPath = "C:" ;
148148 private fileActualName = "" ;
149+ private _doFunction ;
150+
149151
150152 constructor ( ) {
151153 /**
@@ -159,9 +161,19 @@ export class DwtService {
159161 * ConnectToTheService is overwritten here for smoother install process.
160162 */
161163 Dynamsoft . DWT . ConnectToTheService = ( ) => {
162- this . mountDWT ( ) ;
164+ //this.mountDWT();
165+ this . _doFunction ( true ) ;
166+ window . location . reload ( ) ;
163167 } ;
168+ Dynamsoft . DWT . OnWebTwainReady = ( ) => {
169+ this . _doFunction ( true ) ;
170+ }
171+ }
172+
173+ showStartDemo ( doFunction ) {
174+ this . _doFunction = doFunction ;
164175 }
176+
165177 mountDWT ( UseService ?: boolean ) : Promise < any > {
166178 this . _DWObject = null ;
167179 return new Promise ( ( res , rej ) => {
@@ -482,8 +494,12 @@ export class DwtService {
482494 */
483495 load ( files ?: FileList ) : Promise < any > {
484496 return new Promise ( ( res , rej ) => {
485- this . _DWObject . Addon . PDF . SetConvertMode ( Dynamsoft . DWT . EnumDWT_ConvertMode . CM_AUTO ) ;
486- this . _DWObject . Addon . PDF . SetResolution ( 200 ) ;
497+ this . _DWObject . Addon . PDF . SetReaderOptions ( {
498+ convertMode : Dynamsoft . DWT . EnumDWT_ConvertMode . CM_AUTO ,
499+ renderOptions : {
500+ resolution : 200
501+ }
502+ } ) ;
487503 this . _DWObject . IfShowFileDialog = true ;
488504 this . _DWObject . RegisterEvent ( "OnPostLoad" , (
489505 directory : string ,
0 commit comments