Hi, I know that this question may not relate directly to KM but it relates to an Applescript that I execute within KM. I am trying to print a document but with a ‘printer preset’ named ‘Black and White - Draft’.
Here is the code, no matter what I do I just cant seem to get the document to be printed with the black and white preset. I am running the latest mac os x.
Any assistance or direction for me to resolve this would be much appreciated:
set theFIle to result
end tell
set strCMD to “osascript -l JavaScript -e '(strPath = decodeURI(”" & theFIle & “”).slice(7)).slice(strPath.indexOf("/"))’"
set strPosixPath to (do shell script strCMD)
set strPrinterName to “HP Officejet Pro X551dw Printer”
tell application strPrinterName
print strPosixPath
end tell