Hi Julio,

Try the following.
In my case, I pass this method a Folder Name and a Document name. This is 
because I deal with multi-language documents kept in separate folders. 
The user sees a name of the document without the “.pdf”.

You could just remove those lines and populate $tFileName with the full system 
path to the document you want to print.

Hope this helps,

Mitch
__________________


C_TEXT($1;$2;$tFolderPath;$tDocumentName;$tPathNameX;$tFileName)
C_TEXT($cmd_t;$in_t;$out_t;$error_t)

$tFolderPath:=$1
$tDocumentName:=$2

$tFileName:=$tFolderPath+$tDocumentName+".pdf"

$cmd_t:="lp -d \"printerName\" \"documentPath\""
$tPathNameX:=Convert path system to POSIX($tFileName)
$cmd_t:=Replace string($cmd_t;"printerName";Get current printer)
$cmd_t:=Replace string($cmd_t;"documentPath";$tPathNameX)

LAUNCH EXTERNAL PROCESS($cmd_t;$in_t;$out_t;$error_t)

_____________________________________

> 
> Message: 7
> Date: Tue, 19 Mar 2019 08:13:00 -0300
> From: Julio Carneiro <jjfo...@gmail.com>
> To: 4D iNug Technical <4d_tech@lists.4d.com>
> Subject: Printing a PDF document from 4D
> Message-ID: <600fa1e4-c853-4792-9dab-eee89773a...@gmail.com>
> Content-Type: text/plain;     charset=us-ascii
> 
> Has anyone here had the need to print a PDF document from 4D, and found a 
> solution?
> 
> I am not talking about generating a PDF from 4D. I have an existing PDF 
> document and I need 4D to print it for me! Exactly, user selects a PDF 
> document and I have 4D command it to be printed.
> 
> I can use LEP, a plugin, whatever, but so far I have not found a way to do 
> it, with a 100% assurance the document will come out faithfully.
> 
> Oh, and this in on Windows.
> 
> Thanks for any pointers.
> --
> Julio Carneiro
> jjfo...@gmail.com
> 
**********************************************************************
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