Driver suddenly unable to email in production system

This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-XChange Printer Drivers SDK (only) - Please use the PDF-Tools SDK Forum for Library DLL assistance.

Moderators: Tracker Support, TrackerSupp-Daniel, Chris - Tracker Supp, Vasyl-Tracker Dev Team, Sean - Tracker, Andrew - Tracker Support, Tracker - Clarion Support, John - Tracker Supp, Tracker Supp-Stefan, Ivan - Tracker Software, Support Staff, moderators

Post Reply
jcooper01
User
Posts: 29
Joined: Thu Mar 03, 2005 10:11 pm

Driver suddenly unable to email in production system

Post by jcooper01 » Fri Feb 03, 2006 4:32 pm

We have an application that is called from a web service. The application runs as a Windows service logged in as a user. The application prints customer statements using the PDF-XChange API and is supposed to email them via SMTP. However, the system is misbehaving. If I log into the machine where the service is running, when a request comes in, the PDF Save Save As... dialog appears. This should never happen, as the PDF should be emailed without user interation. Please help. This is a production system.

Thanks,

Jon Cooper

John - Tracker Supp
Site Admin
Posts: 8201
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Fri Feb 03, 2006 5:47 pm

Hi John,

To assist we will need further info:

1: Windows OS and Version/Service pack status
2: Version of PDF-XChange installed
3: Is this something that has only just started to happen and if so was there anything that precipitated this change in behaviour - i.e. Windows or PDF-XChange Upgrade
4: Are you using our Library/driver SMTP method or another
5: has the clients Mailserver or Hosting altered in anyway

Please also provide the code snippet for this portion of your application code where you provide this functionality.

thanks
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

jcooper01
User
Posts: 29
Joined: Thu Mar 03, 2005 10:11 pm

Post by jcooper01 » Fri Feb 03, 2006 7:11 pm

Tracker Support wrote:Hi John,

To assist we will need further info:

1: Windows OS and Version/Service pack status
2: Version of PDF-XChange installed
3: Is this something that has only just started to happen and if so was there anything that precipitated this change in behaviour - i.e. Windows or PDF-XChange Upgrade
4: Are you using our Library/driver SMTP method or another
5: has the clients Mailserver or Hosting altered in anyway

Please also provide the code snippet for this portion of your application code where you provide this functionality.

thanks
We are running on Windows Server 2003 SP1 and PDF X-Change 3.5. This just started, and nothing that we know of precipitated it. We are using the driver's SMTP method. Here's some additional info:

When I run the application as a user logged in via RDP, the application picks upt he requests from the web server and prints / emails successfully. When I run the application as a service as that same user, I can see the PDF driver printing the document by looking at the queue. However, no email gets sent.
If I log in to the server via RDP as the user and run the application as a service, I see the Save As... dialog. I think that the application is waiting for that dialog even in service mode.
I've tried running Ethereal and watched TCP port 25. Then I run the application and see the mail traffic flowing. When I start the service, I see the print spooler going but no mail traffic flowing.

Code: Select all


IF IsBatch THEN BEGIN
  PDFSetup.TESTFIELD("SMTP Server");
  UserSetup.GET(USERID);
  UserSetup.TESTFIELD("E-Mail");
  PDFXChange.SetParamLong(0, 'Email.Type', 3);
  PDFXChange.SetParamStr(0, 'Email.SMTP.Address', PDFSetup."SMTP Server");
  PDFXChange.SetParamLong(0, 'Email.SMTP.Port', PDFSetup."SMTP Port");
  PDFXChange.SetParamStr(0, 'Email.SMTP.UserName', PDFSetup."SMTP Username");
  PDFXChange.SetParamStr(0, 'Email.SMTP.Password', PDFSetup."SMTP Password");
  IF PDFSetup."SMTP Use SSL" THEN BEGIN
    PDFXChange.SetParamLong(0, 'Email.SMTP.UseSSL', 1);
  END ELSE BEGIN
    PDFXChange.SetParamLong(0, 'Email.SMTP.UseSSL', 0);
  END;
  PDFXChange.SetParamStr(0, 'Email.From', UserSetup."E-Mail");
END ELSE
  PDFXChange.SetParamLong(0, 'Email.Type', 1);
.
.
.
.

IF STRLEN(EmailTo) > 0 THEN
  PDFXChange.SetParamStr(0, 'Email.To', EmailTo);
IF STRLEN(EmailCC) > 0 THEN
  PDFXChange.SetParamStr(0, 'Email.CC', EmailCC);
IF STRLEN(EmailSubject) > 0 THEN
  PDFXChange.SetParamStr(0, 'Email.Subject', EmailSubject);
IF STRLEN(EmailBody) > 0 THEN
  PDFXChange.SetParamStr(0, 'Email.Content', EmailBody);

John - Tracker Supp
Site Admin
Posts: 8201
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Sat Feb 04, 2006 10:50 am

Could I ask please for a little more info :

1: Has this app worked as a 'Sevice' previously ok on this Machine?
2: Which specific build of PDF-XChange is in use (See the Printer Preferences 'About' Window) i.e. 3.500 Build 0098.

and most importantly :

3: Can this Service interact with the 'Desktop' successfully?

i.e. :

If you look at the properties of a Service in Windows, the "Log On" tab, has an option "Allow service to interact with the desktop" ("Log on as" should have a value "Local system account")


Thanks
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

jcooper01
User
Posts: 29
Joined: Thu Mar 03, 2005 10:11 pm

Post by jcooper01 » Mon Feb 06, 2006 1:48 pm

Tracker Support wrote:Could I ask please for a little more info :

1: Has this app worked as a 'Sevice' previously ok on this Machine?
2: Which specific build of PDF-XChange is in use (See the Printer Preferences 'About' Window) i.e. 3.500 Build 0098.

and most importantly :

3: Can this Service interact with the 'Desktop' successfully?
1. Yes, the app worked previously as a service.
2. Version 3.50 Build 0092
3. The service logs on as a user, so it would have access to the desktop.

John - Tracker Supp
Site Admin
Posts: 8201
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Mon Feb 06, 2006 2:36 pm

Hi,

We have tested the sample application provided in the SDK located in this folder (assumes default install path accepted) :
C:\Program Files\Tracker Software\PDF-XChange PRO 3 SDK\Examples\APIExamples\Service

All works as it should here with the latest build 3.5098 - please update your build and test.

If you are still having problems with both your app and the sample app provided - please advise the last 'good' build in which your application worked and we will investigate further.

Also if you wish to create a small sample application that fails to function in build 3.5098 as required - please feel free to send both project source and compiled version with some simple installation/useage instructions and we would be pleased to look at here and advise.

thanks
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

jcooper01
User
Posts: 29
Joined: Thu Mar 03, 2005 10:11 pm

Post by jcooper01 » Mon Feb 06, 2006 2:39 pm

Where can I get the latest version of the small installer (PDFX3SA_sm.exe)?

John - Tracker Supp
Site Admin
Posts: 8201
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Mon Feb 06, 2006 2:42 pm

See the client installer Link on this page :

http://www.tracker-software.com/home/de ... river_api/

Or this files is always available from :

http://www.tracker-software.com/PDFX3SA_sm.zip
and includes both 32/64 bit client installers.
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

jcooper01
User
Posts: 29
Joined: Thu Mar 03, 2005 10:11 pm

Post by jcooper01 » Tue Feb 07, 2006 7:29 pm

That seems to have solved it.

Thanks!

John - Tracker Supp
Site Admin
Posts: 8201
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Tue Feb 07, 2006 8:11 pm

Excellent ;)
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

jcooper01
User
Posts: 29
Joined: Thu Mar 03, 2005 10:11 pm

Post by jcooper01 » Mon Jun 12, 2006 8:12 pm

This is happening again. I can see the document enter the print queue and disappear, but nothing goes out over port 25. We have not changed our code. When this has happened in the past, we have uninstalled the PDF XChange driver, rebooted the server, reinstalled the driver, and rebooted the server. However, this server is now being used for other tasks, so rebuuting it is not a good option.

I am using Ethereal to monitor port 25 and there is no traffic at all.

Thanks,

Jon Cooper

John - Tracker Supp
Site Admin
Posts: 8201
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Tue Jun 13, 2006 9:02 am

Hi Jon,

can you please advise which build you are currently using - is it still 98 ?

thanks
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

jcooper01
User
Posts: 29
Joined: Thu Mar 03, 2005 10:11 pm

Post by jcooper01 » Tue Jun 13, 2006 11:14 am

Yes, it is build 0098.

John - Tracker Supp
Site Admin
Posts: 8201
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Fri Jun 16, 2006 9:39 am

Hi,

We have made some slight changes in build 3.5102 uploaded today which we hope will assist with this - though I should say that as we cannot reporduce this - we are working 'blind' on the problem - hope it helps.
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

jcooper01
User
Posts: 29
Joined: Thu Mar 03, 2005 10:11 pm

Re: Driver suddenly unable to email in production system

Post by jcooper01 » Tue Sep 22, 2009 1:48 pm

I know that this is an old thread, but we are still having the problem and our client is begging for answers. I have more information...

Here's what's happening: Occasionally, when we call the API to set the settings for the next print job (we always e-mail the PDF), the driver does not pick up the settings. When this happens, the driver pops up the File Save As... dialog box. The biggest problem was that there was no way to know this because this is all running as a service. In addition, there was no way to clear the dialog because there is no UI on the service account's session. This causes all subsequent print jobs to get "stuck" behind the job with the popped dialog. We changed the driver settings to never pop up the box and to never prompt to overwrite. This prevents the print jobs from getting "stuck". What now happens is that occasionally the driver won't read the registry settings set by the API and it just starts writing the files to disk instead of emailing them. The only way we've found to get it to start reading the registry again is to reboot the server. Any help would be greatly appreciated.

Thanks,

Jon Cooper

User avatar
Paul - Tracker Supp
Site Admin
Posts: 4885
Joined: Wed Mar 25, 2009 10:37 pm
Location: Chemainus, Canada
Contact:

Re: Driver suddenly unable to email in production system

Post by Paul - Tracker Supp » Wed Sep 23, 2009 4:59 pm

Hi jcooper01

rather than rebooting the server a better option would be just to unload pdfSaver3.exe (using command line option /Quit) or kill the process. I'd like to point out that in V4 we have made a lot of changes to improve support for processes running as a service however this also necesitated a different programming model and would require some changes to your application. You will have to make a call on whether is is reasonable to move your development to V4.

Hope that helps.
_________________
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards

Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com

jcooper01
User
Posts: 29
Joined: Thu Mar 03, 2005 10:11 pm

Re: Driver suddenly unable to email in production system

Post by jcooper01 » Wed Sep 23, 2009 6:02 pm

Hi, Paul. We tried to move to V4 but the new DLL doesn't fire events in our environment for some reason (or it couldn't last time we tried a few months ago). Have there been many changes in that area? (see post http://www.tracker-software.com/forum3/ ... 808#p22027)

Thanks,

Jon

User avatar
Paul - Tracker Supp
Site Admin
Posts: 4885
Joined: Wed Mar 25, 2009 10:37 pm
Location: Chemainus, Canada
Contact:

Re: Driver suddenly unable to email in production system

Post by Paul - Tracker Supp » Wed Sep 23, 2009 10:14 pm

Hi jcooper01,

I'll have to admit to not having sufficiently in depth knowledge to answer that effectively. I've asked the Dev Team to give you their input, it will serve you better. :D
_________________
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards

Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com

Post Reply