0614775139

Printing a PDF using PSOS

Discussion created by 0614775139 on Oct 18, 2018
Latest reply on Oct 23, 2018 by fmpdude

My client requires printing of PDFs to various printers but the printer may not be one of the users available printers so I need the server to print it instead using PSOS when a user clicks a button.

 

Running on Windows FileMaker 16 Server and clients

 

If I open a command prompt on the server and run the following

 

"C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\AcroRd32.exe" /t "P:\ACTIVE PDF\Test.pdf" "SHARP MX-3070N PCL6"

 

It works but I cant get it to work using PSOS.

 

The closest I have got to achieving this is using the Base Elements plugin from GOYA

 

If I execute a script the following:

 

BE_ExecuteSystemCommand (  Quote ("C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\AcroRd32.exe")   & " /t " & Quote ( "P:\ACTIVE PDF\Test.pdf" ) ) & " " & Quote ( "SHARP MX-3070N PCL6" )

 

it works however if I call this script from another script using PSOS it does not work, in fact the client app hangs.

 

I have tried adding "cmd.exe /c " :

 

BE_ExecuteSystemCommand (  "cmd.exe /c " & Quote ("C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\AcroRd32.exe")   & " /t " & Quote ( "P:\ACTIVE PDF\Test.pdf" ) ) & " " & Quote ( "SHARP MX-3070N PCL6")

 

When I do this it no longer works on the client however on the server it runs ( but does not print ) it gives the error

 

""'C:\Program' is not recognized and internal or external command.

 

I have tried more "" quotes less quotes, I even tried calling a batch file instead but always the above error.

Outcomes