If Preview = True Then
fx.ShowExternalDocument(File.GetUri(DataDirName , DataFileName))
Sleep(2000)
ret = True
Else
Dim Params As List : Params.initialize
Params.Add($"-print-to "$)
Params.Add($"""$)
Params.Add(Printer)
Params.Add($"" "$)
Params.Add(DataDirName & DataFileName)
Dim js As Shell
js.Initialize("js", "sumatraPDF.exe", Params)
js.WorkingDirectory = File.DirApp
js.Run(-1)
Wait For js_ProcessCompleted (Success As Boolean, ExitCode As Int, StdOut As String, StdErr As String)
Log("Shell Success=" & Success & ", StdOut=" & StdOut & ", StdErr=" & StdErr)
If Success Then
ret = True
Else
ret = False
End If
End If