Hi Community
Noticed that PDF generated reasonably responsive via local but it become much slower when application was deployed to Terminal Server and launch by remote users via Terminal Services (RDP).
Below are the snippet code:
vdw_obj.Modify("DataWindow.Export.PDF.Method = NativePDF!")
vdw_obj.Modify("DataWindow.Export.PDF.NativePDF.CustomSize = '" + lst_size + "'")
vdw_obj.Modify("DataWindow.Export.PDF.NativePDF.customorientation='0' ")
lst_filename = "C:\WORK\" +vst_pick_no +"_" + lst_document + "_" + gst_user_id + ".pdf"
// [ SAVE TO LOCAL, SPEED UP THE GENERATING ]
messagebox("B4_PRINT", string(now()))
if vdw_obj.SaveAs (lst_filename, PDF! , TRUE) = 1 then
messagebox("AFT_PRINT", string(now()))
if lbo_remote_user then
// [ copy file from local to remote path ]
f_file_copy(lst_filename, gst_file_name, TRUE)
end if
else
messagebox("ERROR MESSAGE(10)", "PDF PRINTING FAILED")
return -1
end if
Result:
Time to complete the statement "if vdw_obj.SaveAs (lst_filename, PDF! , TRUE) = 1 then"
- Locally : 1~2 sec ( save to local C drive )
- Remote user via Terminal Service : at least 20sec ( save to terminal server C drive )
Wonder what is delaying the "saveas" statement while it is trigger via terminal services
Rgds,
Chee Boon
Appreciated.