Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Alternative to Amyuni
Message
 
À
06/12/2007 12:51:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Divers
Thread ID:
01272773
Message ID:
01275034
Vues:
29
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform