I am attempting to have the user print directly to a PDF with code in
a commandbutton rather than going through the dialog box and select
the PDF driver.
I have tried :
lcprinter="Adobe PDF" && installed driver
set printer to (lcprinter)
report form MyForm.frx noconsole to printer
The report always goes to the Windows default driver (?set("printer",
2)).
I have unchecked the "printer environment" box on the reports menu for
the report form.
I can get it to work if I run it with a PROMPT command:
report form MyForm.frx noconsole to printer prompt &&this displace
the select printer dialog box
Any suggestions on how to print directly to a PDF file without going
through the printer dialog box?
--
Fred
Microsoft Visual FoxPro MVP
"benjamin" <dwight...@state.mn.us> wrote in message
news:56b4b6f6-c523-4be4...@s1g2000pra.googlegroups.com...
--
Fred
Microsoft Visual FoxPro MVP
"Fred Taylor" <fta...@mvps.org!REMOVE> wrote in message
news:uit97iiD...@TK2MSFTNGP02.phx.gbl...
Good morning.
I have the same problem.
My printers are set in a Novell Netware environment.
I have tryed to do this SET PRINTER TO NAME (network name/printer name)
syntax.
but it don't work. I can see my printers through Windows Netware
Connections in My Network Connections, but nothing. I can't get it to do it.
The workstations only have an install of the VFP libraries and support files
to run my programs, but VFP is not installed on them.
The old program, which was in Foxpro Dos 2.6a, uses the CAPTURE/ END CAPTURE
to change printers depending on where invoices are shipped to, but I can't
use it with Windows XP.. it always conflicts with it. Windows 2000 Pro is
ok with it, but not XP.
I thought about changing to NET USE commands, but I rather use the SET
PRINTER TO NAME command.
Let me know if there is something I might be missing that might be causing
me not to be able to do it.
Thanks in advance and if there is any additional information you want,
please let me know..
Juan.
"Fred Taylor" <fta...@mvps.org!REMOVE> wrote in message
news:uit97iiD...@TK2MSFTNGP02.phx.gbl...
I figured it out.
I have to install each Netware Printer on the local system for it to work.
Later,
Juan.
"Juan Alonso" <jo...@npdlink.com> wrote in message
news:%23HuEJjC...@TK2MSFTNGP06.phx.gbl...
--
Fred
"Juan Alonso" <jo...@npdlink.com> wrote in message
news:O0ntfzCQ...@TK2MSFTNGP02.phx.gbl...
You might want to do something like this:
= APRINTERS(laPrintArray )
IF ASCAN(laPrintArray, "Adobe PDF") > 0
SET PRINTER TO NAME "adobe pdf"
REPORT FORM <your report name> TO PRINTER NOCONSOLE NODIALOG
SET PRINTER TO DEFAULT
ELSE
REPORT FORM <your report name> TO PRINTER NOCONSOLE NODIALOG
ENDIF
This worked for me on the job very nicely. One of the key things you
may be missing is the SET PRINTER TO NAME (<your driver name>)
You may have to play with this a bit to adapt it to your exact setup,
but it should put you in the ballpark. Good luck.
In your code, I don't know how you can specific the filename.
My code work well at Adobe 5.
In Adobe 7 or Adobe 9, It will create the TXT file, then I need to manually
ope the distiller to convert the file into pdf.
Do you know how to convert it to PDF automatically within VFP 9?
"Henry" <gree...@optonline.net> wrote in message
news:49518a0f$0$20279$607e...@cv.net...