I wrote a while back, a small java program to merge data from an AS400 database using ODBC which worked fine pre 2.4.
Basically the AS400 called this program in batch, passing the java program details of the document and the number of copies, printer name etc.The AS400 then calls the java program via RUNRMTCMD on a PC. Now I've upgraded to 2.4 I'm getting double the amount of copies I need printing unless of course the number is one..On the printer queue it states 2 copies but 4 get printed.
Anybody here see this - and most importantly solved it. I'm setting the number of copies on the mmservice property value.
Code: Select all
PropertyValue[] printOpts = new PropertyValue[1];
printOpts[0] = new PropertyValue();
printOpts[0].Name = "CopyCount";
printOpts[0].Value = new Short((short) copies);
oObjProps.setPropertyValue("DataSourceName", mSource);
oObjProps.setPropertyValue("ActiveConnection", xConnection);
oObjProps.setPropertyValue("Command", mQRY);
oObjProps.setPropertyValue("CommandType", new Integer(
com.sun.star.sdb.CommandType.QUERY));
oObjProps.setPropertyValue("OutputType", new Short(
com.sun.star.text.MailMergeType.PRINTER));
oObjProps.setPropertyValue("DocumentURL", loadUrl);
oObjProps.setPropertyValue("PrintOptions", printOpts);
Kevin