Right Fax Error "Problem Converting Fax Body or Cover Sheet"

Below is the code I use to send the fax.  It works 60% of the time.  When it doesn't work, I get an error from Right Fax that says "Problem Converting Fax Body or Cover Sheet" with the data "Error 2 occurred while trying to load the images for the fax.  The system cannot find the file specified."  The files I attach are left on the drive for an hour after faxing.  They all open properly.  All of the faxes include one text file and one pdf.  All of them are identical in my testing, but only 60% are sent and 40% return this error...

I have tried adding thread.sleep calls in various places, but even with sleep times of 10 seconds after attaching and after sending, the error occurs.

Here is my code...

                RFXServ.OpenServer()
                RFXDoc = RFXServ.CreateObject(RFCOMAPILib.CreateObjectType.coFax)
                With RFXDoc
                    'Populate the basic data... we already know that we have a non-null fax number,
                    'so no need to check again...
                    .ToFaxNumber = dr.FaxNumber
                    With RFXServ.AuthorizationUser
                        'Effectively, we do not want any feedback coming back from the fax server telling
                        'us anything about the sending status...
                        .SendNotifyOnIncompleteFirstTime = False
                        .SendNotifyOnIncompletePeriodically = False
                        .SendNotifyOnNoHoldForPreview = False
                        .SendNotifyOnSendFailedWillRetry = False
                        .SendNotifyOnSendFailure = False
                        .SendNotifyOnSendHeldForApproval = False
                        .SendNotifyOnSendingFirstTime = False
                        .SendNotifyOnSendFailure = False
                        .SendNotifyOnSendingPeriodically = False
                        .SendNotifyOnSentSuccessfully = False
                    End With

                    If dr.IsFaxToNameNull = False Then
                        .ToName = dr.FaxToName
                    End If
                    If dr.IsFaxFromNameNull = False Then
                        .FromName = dr.FaxFromName
                    End If
                    For Each tblDocumentsToIncludeRow In mr.GetChildRows("MessageDocumentsToInclude")
                        'This line attaches the document to the fax... we do not delete on sending
                        'because we may send to multiple recipients.
                        .Attachments.Add(tblDocumentsToIncludeRow.DocumentName, RFCOMAPILib.BoolType.False)
                        Thread.Sleep(cGeneralParametersRow.SleepMilisecondsAfterFaxing)
                    Next
                    .Send()
                    'We need to give the fax server time to pickup and convert the documents before we delete them...
                    Thread.Sleep(cGeneralParametersRow.SleepMilisecondsAfterFaxing)
                    RFXServ.CloseServer()
                End With
                Return True
gswitzAsked:
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.

gswitzAuthor Commented:
Thanks.  Your answer was interesting, but we are a big shop (15,000 employees) and we have a dedicated Fax Server running Right Fax that is  throwing an error when given lots of PDF objects to convert to images before faxing.  If I could award you a couple of points for effort, I would.

Best,

Geoff
0
JMeltonCommented:
I know this is on the verge of being abandoned, but I think I found a workaround for this.  If you have the end user fax the document from Acrobat instead of Word, the document doesn't seem to fail.

The only thing I can figure is that, in my case, there is some conflict between the versions of Office, Rightfax, and Acrobat that we are using.  Good Luck.

Jim
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

moduloCommented:
PAQed with points refunded (500)

modulo
Community Support Moderator
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
johnwbrowniiiCommented:
The conversion of PDF document by Captaris' RightFax requires that a "PDF Module" be licensed on the RightFax server.  While MS Word, Excel, etc. will convert without any special module, the AUTOMATIC CONVERSION of PDF files added to faxes as attachments require the PDF module. Go to your Fax Server Activated Features page in control panel or within Enterprise Fax manager to see if you have the PDF module licensed.
Interestingly, when you print from Acrobat to the RightFax printer, the output is PCL via the print driver so the conversion would work with or without the module.  
That is why I suspect that you don't have a licensed PDF mofule.
Good luck with that

0
gswitzAuthor Commented:
Thanks for your post. We actually do have that Plug-in installed. We don't have the problem any more, however. We solved it a long time ago. I think part of the solution was a pretty healthy thread sleep after sending the fax. I'm not sure why it was required, but it seems to make the difference. We sleep 4 seconds after each fax we send. I notice in the app parameters we have a node that says to sleep 10 secs after a RightFax exception, but I'm pretty sure we haven't gotten a right fax exception for years now.

Currently, the code in production looks like this...

        Dim RFXServ As RFCOMAPILib.FaxServer

            RFXServ = New RFCOMAPILib.FaxServer
            RFXServ.Protocol = RFCOMAPILib.CommunicationProtocolType.cpTCPIP
            RFXServ.ServerName = cGeneralParametersRow.RFXServServerName
            RFXServ.AuthorizationUserID = cGeneralParametersRow.RFXServAuthorizationUserID
            'RFXServ.AuthorizationUserPassword = ""
            RFXServ.UseNTAuthentication = RFCOMAPILib.BoolType.False


'SendFax sends a fax...
Private Function SendFax( _
              ByRef dr As dsMessagesWithPDFs.DeliveryInfoRow, _
              ByRef RFXServ As RFCOMAPILib.FaxServer, _
              ByRef mr As dsMessagesWithPDFs.MessageRow) As Boolean
      Dim RFXDoc As RFCOMAPILib.Fax
      Dim i As Int16
      Dim tblDocumentsToIncludeRow As dsMessagesWithPDFs.DocumentsToIncludeRow
      Try
            If dr.IsFaxNumberNull = False Then
                  'Create the fax object...
                  RFXDoc = RFXServ.CreateObject(RFCOMAPILib.CreateObjectType.coFax)
                  With RFXDoc
                        'Populate the basic data... we already know that we have a non-null fax number,
                        'so no need to check again...
                        .ToFaxNumber = dr.FaxNumber
                        With RFXServ.AuthorizationUser
                              'Effectively, we do not want any feedback coming back from the fax server telling
                              'us anything about the sending status...
                              .SendNotifyOnIncompleteFirstTime = False
                              .SendNotifyOnIncompletePeriodically = False
                              .SendNotifyOnNoHoldForPreview = False
                              .SendNotifyOnSendFailedWillRetry = False
                              .SendNotifyOnSendFailure = False
                              .SendNotifyOnSendHeldForApproval = False
                              .SendNotifyOnSendingFirstTime = False
                              .SendNotifyOnSendFailure = False
                              .SendNotifyOnSendingPeriodically = False
                              .SendNotifyOnSentSuccessfully = False
                        End With

                        If dr.IsFaxToNameNull = False Then
                              .ToName = dr.FaxToName
                        End If
                        If dr.IsFaxFromNameNull = False Then
                              .FromName = dr.FaxFromName
                        End If
                        'For each non PDF attachment...
                        For Each tblDocumentsToIncludeRow In mr.GetChildRows("MessageDocumentsToInclude")
                              'This line attaches the document to the fax... we do not delete on sending
                              'because we may send to multiple recipients.
                              .Attachments.Add(tblDocumentsToIncludeRow.DocumentName, RFCOMAPILib.BoolType.False)
                        Next
                        RFXServ.OpenServer()

                        .Send()
                        RFXServ.CloseServer()
                        'We need to give the fax server time to pickup and convert the documents before we delete them...
                        Thread.Sleep(cGeneralParametersRow.SleepMilisecondsAfterFaxing)
                  End With
                  Return True
            Else
                  AlertUser("Fax Number for message " & dr.Message_Id & "  Delivery Info ID: " & dr.DeliveryInfo_Id & " is null.")
            End If
      Catch ex As Exception
            AlertUser("SendFax: " & ex.Message)
      Finally
            Try
                  'Dispose of the Fax Document Object...
                  If Not RFXDoc Is Nothing Then
                        System.Runtime.InteropServices.Marshal.ReleaseComObject(RFXDoc)
                        RFXDoc = Nothing
                  End If
            Catch exc As Exception
                  AlertUser("SendFax: " & exc.ToString)
            End Try
      End Try
End Function 'SendFax
0
gswitzAuthor Commented:
You'll see this comment...
'For each non PDF attachment...

Please, ignore this comment. The attachments are almost always PDFs. The service is also set up to handle no PDFs. This comment should be removed.

Thanks,

Geoff
0
caleadevelopersCommented:
Hi,

I am having the same problem. May I ask, how do you set the sleep time?

Thanks in advance.
Omer
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
Visual Basic.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.