Julio & all

That does indeed, work.  However, the SW_Hide parameter does not seem to 
suppress the print
dialogs.  Since I actually need to print multiple documents at once, the user 
does not want to
press the print button after every page (and there could be 50+ pages, so I 
don’t blame them)

I’ll read the docs a bit and the resource Chip posted, but if anyone has beat 
their head against
this wall before and either has a solution, or knows there isn’t one, I’d 
appreciate hearing
about it.

Thanks again,

DKC

> On May 6, 2019, at 2:39 PM, Julio Carneiro via 4D_Tech <[email protected]> 
> wrote:
> 
> Sorry Doug, my fault. I should have indicated that you need to use Win32API 
> “sys_ShellExecute”, instead of 4D’s LEP.
> 
> In your case something like this should do the job:
> $x:=sys_ShellExecute ("print”;Document;"";"";SW_HIDE) 
> 
> Give that a try and see if it works for you. That does work for me.
> 
> hth
> julio
>> On May 6, 2019, at 3:22 PM, Doug Cottrill via 4D_Tech <[email protected]> 
>> wrote:
>> 
>> Julio (and all),
>> 
>> So I tried the following code:
>> 
>> $docName:=Select document("";".pdf";"Please select a document for print 
>> test:";0)            
>> If (OK=1)
>>      LAUNCH EXTERNAL PROCESS("print "+Document)
>>      LAUNCH EXTERNAL PROCESS("print "+Char(Quote)+Document+Char(Quote))
>>      LAUNCH EXTERNAL PROCESS("print";Document)
>>      LAUNCH EXTERNAL PROCESS(Char(Quote)+"print "+Document+Char(Quote))
>> End if 
>> 
>> But none of those calls actually caused the selected PDF file to be printed.
>> I tried them one at a time but put them all there at once for clarity.
>> So, I’m clearly not getting the exact format correct.  Can someone tell me
>> what the exact syntax should be to get this to work?  I have set PDF Reader
>> to be the default application and verified that I can print the document I 
>> select
>> if I open it manually.
>> 
>> So, any ideas on what I’m doing wrong?  More generally, is there a resource 
>> I can 
>> review to understand what I should be doing with LEP on windows in general.
>> 
>> If I can’t figure it out, I will try using the Win32API that someone else 
>> suggested-
>> the downside is that on windows you do actually have to open the document in 
>> a 
>> visible 4D window first, but I think we can live with that as long as we 
>> don’t need
>> any user interaction to get it to print.  (I’m actually printing multiple 
>> documents in
>> one go, so having to do all the page setup stuff each time would get old 
>> fast)
>> 
>> Thanks,
>> 
>> DKC
>> 
>> 
>>> On May 6, 2019, at 10:57 AM, Doug Cottrill via 4D_Tech 
>>> <[email protected]> wrote:
>>> 
>>> Thanks Julio! I will give that a try- sounds like exactly what I was hoping 
>>> for.
>>> 
>>>> On May 4, 2019, at 7:09 AM, Julio Carneiro via 4D_Tech 
>>>> <[email protected]> wrote:
>>>> 
>>>> Try: “print xx.pdf”… simple as that :-)  
>>>> 
>>>> it tells Win 10 to just print the document using whatever app is set do 
>>>> print the type of document passed to the command. It’ll no open the app, 
>>>> will just print the document.
>>>> 
>>>> hth
>>>> julio
>>>> 
>>> 
>> 
>> 
>> **********************************************************************
>> 4D Internet Users Group (4D iNUG)
>> Archive:  http://lists.4d.com/archives.html
>> Options: https://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:[email protected]
>> **********************************************************************
> 
> --
> Julio Carneiro
> [email protected]
> 
> 
> 
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:[email protected]
> **********************************************************************


**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to