BCL Technologies EasyPDF SDK - WordPrintJob

I have written a web service that converts word and excel documents to pdf using BCL Technologies SDK.  This is essentially a DLL that allows you to call certain PDF actions.  Here is my code:

(The WordToPDF routine is identical, but the printer object as a WordPrintJob method)

[WebMethod]
            public string ExcelToPDF( string notRef, string xlsFileName, string pdfFileName )
            {
                  string srcPDF = @"\\DGPDC2\Library\" + notRef + @"\Queue\" + xlsFileName;
                  string destPDF = @"\\DGPDC2\Library\" + notRef + @"\" + pdfFileName;
                  
                  BEPPRINTLib.Printer printer = new BEPPRINTLib.PrinterClass();
                  BEPPRINTLib.ExcelPrintJob printJob = null;

                  try
                  {
                printJob = printer.ExcelPrintJob;
                        printJob.LicenseKey = "****-****-****-****";
                        printJob.PrintOut( srcPDF, destPDF );
                  }
                  catch(Exception err)
                  {
                        return "Error: " + err.Message;
                  }

                  return "SUCCESS";

            }

The both the WordToPDF and ExcelToPDF routine work perfectly on my local machine.  When I upload the code to our web server, the Excel routine works fine, but the Word services fails with a timeout error.

By monitoring the printer manager on the server, I can see that the document is sent to the printer, but all that is created is a 1k PDF document, with no content.  The server seems to take far longer to process the word document, even though all of the files I am converting are very small (1 page).

Is there any specific com security that would cause this timeout? How come it works locally?

Where can I start looking? Any help would be greatly appreciated - a job which should have taken a few days is now into the third week.  I have contacted BCL and asked them for help, but they are taking some time to reply.  Please let me know if you need any other info.

Thanks!
daviesgroupAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

bruintjeCommented:
Hi daviesgroup,
----------

not sure but you can read up on the properties and methods in the API reference, it could be some explicit timeout setting
http://www.pdfonline.com/easypdf/ep4sdk_manual/index.htm?page=reference%2fprintersdk%2fwordprintjob%2fdescription.htm

on the other hand maybe the printjob is trying to write/access a certain folder that it has no valid authentication for being on the network, maybe some parts of your word document are linked to other network parts ?

----------
bruintje
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
daviesgroupAuthor Commented:
Many thanks for tyour quick response.

BCL offered me some timeout settings as follows:

printJob.InitializationTimeout = 2 * 60000;
printJob.PageConversionTimeout = 2 * 60000;
printJob.FileConversionTimeout = 2 * 60000;

Unfortunately, none of these helped.

The Word documents are in the same location as the Excel files, so folder security can't be an issue.  The documents do not contain any linked information.
0
daviesgroupAuthor Commented:
By process of elimination I have managed to finally resolve the problem.

I simply added the following line, so that the print job didn't run in background, and it worked like a dream...

printJob.PrintInBackground = false;

Thanks for all your help anyway...
0
daviesgroupAuthor Commented:
On the basis that bruintje pointed me in the right direction, by re-looking at the SDK user manual, he did contribute towards me solving the problem.

Thanks!
0
bruintjeCommented:
great, i was already trying to come up with smart addition but couldn't :-)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.