Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Alternative to Amyuni
Message
 
To
06/12/2007 12:51:56
General information
Forum:
Visual FoxPro
Category:
Third party products
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01272773
Message ID:
01275034
Views:
30
>I have send the files via private email. If you have questions let me know.
>
>John Fabiani

John,

Thanks for the code. I pulled four lines out and now it's doing what I needed. The thing that I almost missed was that it takes two passes, first print the postscript file, then use that to print to pdf.

For anyone else lurking there are two things you have to do before the following code will work:
1. download freepdf ghostscript (free)
2. download adobe's postscript print drivers (also free)
set procedure to gs addi   && you need the gs.prg that John shared with me.

* set word's printer to the PS Printer
oword.ActivePrinter = "Generic PostScript Printer"
oword.ActiveDocument.printout(.t.,,,lcprnfile)
*then
DO WHILE .T.
	ADIR(LAFILES,lcprnfile)
	_SCREEN.ADDPROPERTY('LNPRNSIZE',LAFILES(1,2))
	WAIT WINDOW TIMEOUT 1
	IF LAFILES(1,2)==_SCREEN.LNPRNSIZE
		EXIT
	ENDIF
ENDDO
oword.activedocument.close()
oword.quit()
lcprnfile=LOWER(lcprnfile)
LCOUTFILE=STRTRAN(lcprnfile,'prn','pdf')
x=PS2PDF(lcprnfile,LCOUTFILE)
John Harvey
Shelbynet.com

"I'm addicted to placebos. I could quit, but it wouldn't matter." Stephen Wright
Previous
Reply
Map
View

Click here to load this message in the networking platform