Developments:1) Tried method as describe by Se7en above: printer path is correct.
Result:Job not added to print queue, no noticeable result. Could this be a permissions thing? Seeing as I'm not administrator on the computer?
2) Advancement in OLE Automation approach.
After a touch of research, I found that the exe print command could be found using something like:
(defun GetPrintCmd ( / wsh reg result )
(setq wsh (vlax-create-object "WScript.Shell"))
(if (setq reg (vlax-invoke wsh 'RegRead "HKCR\\.pdf\\"))
(setq result (vlax-invoke wsh 'RegRead (strcat "HKCR\\" reg ".7\\shell\\print\\command\\")))
)
(vlax-release-object wsh)
result
)
(For the relevant version of Adobe)
I tried using the result of the above to manipulate the .exe as before, and the jobs were added to the queue. But, as before, only the first job prints and the others register that seemingly only half the data has been sent - causing a timeout error.
But, during my digging in the registry, I found entries for the AcroExch.App Object, using the ProgID AcroExch.App.1 - this returned a valid object which I could query for properties.
I then found
info on the net relating to how to manipulate such objects for printing, and translated it to VL:
(defun c:test ( / pdf_file adobe pddoc printdoc n avdoc )
(setq pdf_file "H:\\My Documents\\Test.pdf")
(setq adobe (vlax-create-object "AcroExch.app.1"))
(setq pddoc (vlax-create-object "AcroExch.PDDoc.1"))
(setq printdoc (vlax-create-object "AcroExch.AvDoc.1"))
(vlax-invoke printdoc 'open pdf_file "")
(setq n (vlax-invoke pddoc 'GetNumPages))
(princ (strcat "\nPages: " (itoa n)))
(setq avdoc (vlax-invoke adobe 'GetActiveDoc))
(print (vlax-invoke avdoc 'PrintPages 0 n 1 0 0))
(vlax-invoke pddoc 'Close)
(vlax-invoke adobe 'CloseAllDocs)
(vlax-invoke adobe 'Exit)
(vlax-release-object pddoc)
(vlax-release-object adobe)
(vlax-release-object printdoc)
(princ)
)
This opens the document OK, but the PrintPages method seems to return 0, indicating an error during printing