Date:  10/31/2004 09:44:58 PM Msg ID:  002324
From:  FoxWeb Support Thread:  002321
Subject:  Re: AAaarragh Printer Driver
I really don't know what could be causing this error (and the VFP documentation is not clear on the subject), but I recommend that you try creating a PDF file in a regular VFP program first.  Once you have VFP working with WIN2PDF, simply plug in the relevant code in an FWX file.

FoxWeb Support Team
support@foxweb.com email

Sent by Joe Goldsmith on 10/31/2004 06:58:50 PM:
I downloaded and installaed WIN2PDF (v. 2.255) on an XP PRO machine. I was able to print to it from MSWORD and print a test page from the driver. I created an FWX with the following code:
<%
LOCAL MergedText
M.MergedText = Request.QueryString('mletter')
%>
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>
</BODY>
</HTML>
<%
SET PRINTER TO NAME "WIN2PDF"
TempFile = SYS(2023) + '\' + SYS(2015) + LTRIM(STR(Request.CurrentChannel)) + '.pdf'
STRTOFILE(M.MergedText, TempFile)
%>
 
I run the fwx I get the QueryString and then open the printer driver, WIN2PDF. Each time I get the following error message:
 
Error #:      1957
Message: Error accessing printer spooler.
Program: c:\inetpub\wwwroot\refer\printit1.fxp
Line #: 15
Line: SET PRINTER TO NAME "WIN2PDF"

Anyone have an idea what I am doing wrong please?

Joe