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 <4d_tech@lists.4d.com> 
> 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 
>> <4d_tech@lists.4d.com> 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:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to