Hi All,
I have a task to investigate a possible direct printing with an Adobe DDE-call from Forms12c. I know there is a JAVA solution that works and I know there is a OLE solution if ADOBE is licensed.
The DDE solution should still work for the free ADOBE Reader. The Job here is to find out if this could be an alternative. Has anyone a solution for this?
My example starts Acrobat but always fails with "MESSAGE('DDE CANNOT ESTABLISH A CONVERSATION');"
I am using local parameters
[HKEY_CLASSES_ROOT\acrobat\shell\open\command]
[HKEY_CLASSES_ROOT\acrobat\shell\open\ddeexec]
And I took a solution from Oracle Support and modfied it with ADOBE commands.
I want to open the PDF document, print it, and Close it again with DDE commands.
-----------------------------------------------------------------------------------------------------------------------
DECLARE
x number(1) := 0;
appid PLS_INTEGER;
convid PLS_INTEGER;
docid PLS_INTEGER;
/* Begin trigger DDE sample */
BEGIN
/* Start Acrobat */
/* This line assumes that Excel is in the directory e:\msoffice\excel */
APPID := DDE.APP_BEGIN('"C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe"',DDE.APP_MODE_NORMAL);
--dbms_lock.sleep(2);
synchronize;
convid := DDE.INITIATE('AcroViewR10','control');
--dbms_lock.sleep(2);
DDE.Execute(ConvID,'[DocOpen(C:\temp\test.pdf)]',100000);
DDE.EXECUTE(convid,'[APPExit()]', 100000);
DDE.TERMINATE(docid);
DDE.TERMINATE(convid);
DDE.APP_END(appid);
/* Handle exceptions */
EXCEPTION
WHEN DDE.DDE_APP_FAILURE THEN
MESSAGE('WINDOWS APPLICATION CANNOT START.');
WHEN DDE.DDE_PARAM_ERR THEN
MESSAGE('A NULL VALUE WAS PASSED TO DDE');
WHEN DDE.DMLERR_NO_CONV_ESTABLISHED THEN
MESSAGE('DDE CANNOT ESTABLISH A CONVERSATION');
WHEN DDE.DMLERR_NOTPROCESSED THEN
MESSAGE('A TRANSACTION FAILED');
/* End of trigger */
END;