My application currently creates PDF files for printing. They are printed from Solaris on the server using the "iprint" command.
When a user wishes to do a reprint of a number of documents, it is best to join them together so that they come out on the printer as 1 job.
I have started testing with iText, adapting some example code to open an existing PDF, add a watermark and write on the page. The files produced open fine in Adobe PDF viewer, but they do not print with iPrint. A service copies them to a temp file (see "163") below, then shells to call iprint.
//sample: iprint -p it12 -f si.txt -o orientation=protrait
String[] args = new String[]{prtCommand, "-p", printerName, "-f", file.getAbsolutePath(),
"-o", orientationOption};
StringBuffer cmdOutput = new StringBuffer();
int retValue = p.execute(args, cmdOutput);
if ( retValue != 0 )
throw new PrintException("Fail to print, reason: "+cmdOutput.toString());
Error:
print.core.PrintException: Fail to print, reason: Unrecognised file format: /usr/local/bea2/weblogic61SP1/./163: data
at weblogic.iiop.OutboundRequestImpl.sendReceive(OutboundRequestImpl.java:48)
Has anyone seen this before?