Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Print PDF Silently
Message
From
11/12/2014 13:11:45
 
 
To
05/12/2014 14:08:56
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01611911
Message ID:
01612168
Views:
72
Likes (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
Previous
Reply
Map
View

Click here to load this message in the networking platform