Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 23888
  • Last Modified:

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
0
gswitz
Asked:
gswitz
1 Solution
 
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
moduloCommented:
PAQed with points refunded (500)

modulo
Community Support Moderator
0
 
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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now