1. Chee Boon Ang
  2. PowerBuilder
  3. Friday, 15 December 2017 03:06 AM UTC

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
Roland Smith Accepted Answer Pending Moderation
  1. Monday, 18 December 2017 03:45 AM UTC
  2. PowerBuilder
  3. # 1

Native PDF is slower than Ghostscript. Both of them create temp work files on disk. Ghostscript writes them to the TEMP folder. Native PDF has been writing to the folder the application is located in. They plan on changing to the folder the PDF is being created in.

 

Comment
  1. Chee Boon Ang
  2. Monday, 18 December 2017 05:11 AM UTC
Thanks Roland.



Appreciated.

  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.