Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Print PDF Silently
Message
De
11/12/2014 13:11:45
 
 
À
05/12/2014 14:08:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01611911
Message ID:
01612168
Vues:
70
J'aime (1)
Thanks Tore.
I had trouble with ShellExecute(0, "print", lcpdffile, lcprinterName, "",0).
It doesn't find the printer selected.

I did find a solution and thought I'd share it with everyone.

SumatraPDF.exe will print a pdf silently and fast.

It worked like a charm.
Simple to download.
Simple to use.

Go to sumatrapdfreader.org
Free download by Krzysztof Kowalczyk.

Download the Portable version: SumatraPDF-3.0.zip.
Double click and u get sumatraPDF.exe

Here's an example:
*** For this example, copy sumatrapdf.exe and lcpdffile to 'c:\workingfolder\

lcexe = 'sumatrapdf.exe'
lcaction = 'Open'
lcparameters = '-print-to "' + lcprinterName + '" ' + lcpdffile
lcdir = 'c:\workingfolder\'
lnshellexecute = ShellExecute(0, lcaction, lcexe, lcparameters, lcdir, 0)



>
ShellExecute(0, "print", lcpdffile, lcprinterName, "",0)
>
>>How do I print a PDF silently?
>>
>>My code:
>>
>>ShellExecute(0, 'printto', lcpdffile, '"' + lcprinterName + '"', null,0)
>>
>>This code launches the Adobe Reader and keeps it open on the screen.
>>We don't want to see the reader.
>>How do I get rid of it?
>>
>>Please help.
>>Deb
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform