Faxing Under WinXP

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

Faxing Under WinXP

Postby Stéphane Bessette » Tue Apr 26, 2005 9:22 pm

We've recently upgraded to Windows XP (with service pack 2) and are having difficulties faxing with both the Fax service included with Windows XP and with Symantec Winfax 10.02. Tests have been performed with VPE v3.50 and VPE v3.60.

WinXP Fax Service
When manually opening a VPE document in the Vpe Viewer, we can click on the Print button, select the Fax printer, see the VPE "Printing" dialog open and close, fill out the WinXP "Send Fax Wizard", and the VPE document then appears in the Outbox of the "Fax Console", ready to be faxed. This is a success.

But when programatically sending a fax we have a failure. Here's the code used. We program in Progress, a database language.

PROCEDURE Fax:
DEFINE INPUT PARAMETER pcRecipient AS CHARACTER NO-UNDO.
DEFINE INPUT PARAMETER pcFaxNumber AS CHARACTER NO-UNDO.
DEFINE INPUT PARAMETER pcAttachment AS CHARACTER NO-UNDO.
DEFINE INPUT PARAMETER pcCoverpage AS CHARACTER NO-UNDO.

DEFINE VARIABLE objFaxDocument AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE objFaxServer AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE cJobID AS CHARACTER NO-UNDO.

/* Constants: http://msdn.microsoft.com/library/defau ... z_32er.asp */
DEFINE VARIABLE fptLOW AS INTEGER NO-UNDO INIT 0.
DEFINE VARIABLE fptNORMAL AS INTEGER NO-UNDO INIT 1.
DEFINE VARIABLE fptHIGH AS INTEGER NO-UNDO INIT 2.
DEFINE VARIABLE fcptNONE AS INTEGER NO-UNDO INIT 0.
DEFINE VARIABLE fcptLOCAL AS INTEGER NO-UNDO INIT 1.
DEFINE VARIABLE fcptSERVER AS INTEGER NO-UNDO INIT 2.
DEFINE VARIABLE frtNONE AS INTEGER NO-UNDO INIT 0.
DEFINE VARIABLE frtMAIL AS INTEGER NO-UNDO INIT 1.
DEFINE VARIABLE frtMSGBOX AS INTEGER NO-UNDO INIT 4.

CREATE "FaxComEx.FaxServer" objFaxServer NO-ERROR.
objFaxServer:Connect("").

/* http://msdn.microsoft.com/library/defau ... z_4isy.asp */
CREATE "FaxComEx.FaxDocument" objFaxDocument NO-ERROR.
objFaxDocument:Recipients:Add(pcFaxNumber, pcRecipient).
objFaxDocument:Body = pcAttachment.

IF pcCoverpage NE ""
THEN
ASSIGN
objFaxDocument:CoverPageType = fcptLOCAL
objFaxDocument:CoverPage = pcCoverpage.
ELSE
ASSIGN
objFaxDocument:CoverPageType = fcptNONE.

ASSIGN cJobID = objFaxDocument:ConnectedSubmit(objFaxServer) NO-ERROR.

RELEASE OBJECT objFaxDocument NO-ERROR.
RELEASE OBJECT objFaxServer NO-ERROR.
END PROCEDURE.


The parameters are a name (Fax Test), a fax number (1234567890), a fully qualified filename (c:\test.vpe), an empty string (""). The VPE "Printing" dialog appears, goes to 100%, disappears, but the VPE document does not appear in the Outbox of the "Fax Console". When faxing a PDF file (c:\test.pdf) Adobe Reader v7.0 loads,opens the file, and the fax document appears in the Fax Console. Adobe Reader remains open, something that many programmers have complained about to Adobe, without a satisfying resolution. When faxing a text file (c:\test.txt) a Notepad printing progress appears, closes, and the fax appears in the Fax Console. And when faxing a Word file (c:\test.doc), Word opens, loads the file, a printing progress dialog appears, closes, Word closes, and the fax appears in the Fax Console. The code works with .pdf, .txt, and .doc files but fails with .vpe files.


Symantec WinFax
Programatically faxing with Symantec WinFax is even worse now. .vpe, .doc, .txt, .pdf files all result in the "Creating Attachment Image" dialog informing us that "The selected attachment is being converted into a fax image", remains open seemingly forever, never generating an entry in Symantec's "Message Manager"'s Outbox. The same code was used with Win98 with success but obviously needs to be rewritten.

When manually faxing with the wizard and attaching .vpe, .doc, .txt, and .pdf files, their respective programs send a job to the WinFax printer and the attachment is successfully converted/rasterized for use within Symantec WinFax. And the Adobe Reader remains open, as in the case with WinXP Fax.


Registry
The VPE registry key points to VPE v3.60:
Key: HKEY_CLASSES_ROOT\vpedoc\Shell\printto\command
Value: C:\Program Files\VPE VIEW\vpeview.exe /t %1|%2

I've replaced that registry value with:
C:\SeeParam.bat "%1" "%2" "%3" "%4" "%5" "%6"

SeeParam.bat contains the following commands:
@echo 0 %0
@echo 1 %1
@echo 2 %2
@echo 3 %3
@echo 4 %4
@echo 5 %5
@echo 6 %6
@pause

When executed this starts a command prompt where the value of the parameters can be seen: parameter %0 contains the name of the batch file, parameter %1 contains the fully qualified VPE filename (c:\test.vpe), and parameter %2 contains Fax, the name of the WinXP Fax Printer. The other parameters are blanks. This shows that the parameters passed to VpeView.exe /t %1|%2 correspond to VpeView.exe /t c:\test.vpe|Fax, which are the file to be processed and the fax printer to receive the processed document. Parameter %2 is WinFax when faxing to Symantec Winfax.

Any help?
Stéphane Bessette
 
Posts: 9
Joined: Fri Dec 10, 2004 4:35 pm

Postby Stéphane Bessette » Thu Apr 28, 2005 2:05 pm

Is the code to print via the VpeViewer print button the same as the code to print via the vpeview.exe /t command?

Here's something I read on a message board somewhere (paraphrased a little):
With the "SetPrintFromApp" command make sure you release the print job by using "Printer.EndDoc" after you have finished printing to the WinFax PRO printer driver.

Eric C [Symantec]
Online Services, Symantec Corporation
Stéphane Bessette
 
Posts: 9
Joined: Fri Dec 10, 2004 4:35 pm

Postby IDEAL Software Support » Thu Apr 28, 2005 3:13 pm

Yes, the code is the same and EndDoc() is - of course - called internally by VPE. We will investigate your problem and I will let you know about the results.

Regards
Thorsten Radde
IDEAL Software GmbH
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Postby IDEAL Software Support » Thu Apr 28, 2005 3:35 pm

We tested VPE View v3.60 R3 on WinXP with fax services. Unfortunately we have no modem, so we could not test if it really works, but so far, if we enter on the commandline:

vpeview /t "c:\cap.vpe|fax"

it starts the fax agent. If you type the same on your system, can you fax correctly?
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Postby Stéphane Bessette » Thu Apr 28, 2005 4:22 pm

>> EndDoc() is - of course - called internally by VPE

Sorry, did not mean this to sound insulting.

The version of VpeView.exe (properties, Version tab, File version:) is 3.60.0.1. This was obtained from your site, labeled as VPE View v3.60 R3. Our registered SDK is v3.5 Enhanced. The test file test.vpe that I have been using had been created with that SDK.

Within the VpeViewer v3.60's directory I executed the command: vpeview /t "c:\test.vpe|Fax" I also copied the cap.vpe file from the SDK\Images directory to the VpeViewer v3.60 directory and executed the command: vpeview /t "c:\test.vpe|Fax" The "pipe" character is used. Both .vpe files resulted in the same behavior.

The "Vpe Printing" dialog pops up and does not progress beyond 0%

The Symantec "Fax Configuration Wizard" pops up informing me that there is no modem installed and asking me if I want to install one. I click "No".

The Symantec "Send Fax Wizard" pops up. I click "Next", choose a recipient from my Outlook 2003 Address Book who has the E-mail type set to Fax (that recipient has a fax number), I click "Next", select the "Generic" cover page, type "test" in both the subject and note fields, I click "Next", schedule the delivery for Now and Nomal priority, I click "Next". At this point the wizard has obtained all the information it needs and offers me the choice to "Preview Fax" or to "Finish".

When I choose to preview I only see the cover page; the Vpe Printing dialog is still at 0%.

When I choose finish the VPE Printing dialog closes and the fax is sent to Symantec's "Fax Console"'s Outbox. When I double click on it I obtain a preview of the fax, but once again it only contains the cover page; the VPE document is not present. I've also tried a larger .vpe document, containing 458 pages. I never see the VPE Print dialog budge from 0%. When used in the programmatic method provided above, this big.vpe files results in the VPE Print dialog being displayed longer than when using my smaller 1-page test.vpe. However I only see the titlebar and the dialog background: I do not see the progress bar nor any text nor the cancel button. These are all (briefly) visible when invoking the print command: VpeView /p c:\test.vpe
Stéphane Bessette
 
Posts: 9
Joined: Fri Dec 10, 2004 4:35 pm

Postby IDEAL Software Support » Mon May 02, 2005 1:53 pm

We examined the problem in-depth and found this to be a bug in the fax printer-driver. The driver returns a value of zero for the number of copies to print. The returned value should be one, as all normal printer drivers do return.

We now implemented a workaround, which checks if the driver returns zero and set the number of copies to one in this case.

We debugged it with the WinXP standard fax driver and our workaround solves the problem. We assume the Symantec driver has the same problem, but we don't have it available, so we can't test it.

I can't find your name in our customer database. Please send an e-mail to our support e-mail address and I will send you the patched VPE DLL. If it solves the problem with the Symantec driver, too, we will make the patch publicly available as VPE R4 within short.

Regards
Thorsten Radde
IDEAL Software GmbH
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Postby Stéphane Bessette » Tue May 03, 2005 5:00 pm

The patched DLL solved the problem with Microsoft Fax. The code presented above now results in a fax in the outbox, as it should be.

For Symantec Winfax the only solution we have found is to display the Symantec Fax Wizard; we are unable to automatically/transparently send faxes like we were able to in the past. This is not a VPE problem; Word, Acrobat PDF, and even text files are not being processed properly unless we show the send screen with: chWinfax:ShowSendScreen(1).
Stéphane Bessette
 
Posts: 9
Joined: Fri Dec 10, 2004 4:35 pm

Postby IDEAL Software Support » Tue May 03, 2005 5:14 pm

Thank you for the feedback. We will make this patch officially available in VPE v3.60 R4 within short.

Regards
Thorsten Radde
IDEAL Software GmbH
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Postby Stéphane Bessette » Mon May 30, 2005 9:56 pm

Can you offer a new estimate for the release of v3.60R4?
Stéphane Bessette
 
Posts: 9
Joined: Fri Dec 10, 2004 4:35 pm

Postby IDEAL Software Support » Thu Jun 02, 2005 5:29 pm

It has been released right now.

Regards
Thorsten Radde
IDEAL Software GmbH
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 11 guests

cron