Hi I hope that I can get some help here.... I need to print my documents
to
a none default printer.. Is it possible to set it up in the user agent or
the FopFactory currently it only prints to the default printer. My scenario
is
we use fop 0.92 beta on an web server were it will do the transformation
and
prints it to the default printer.. up to now it worked but have an scenario
where we need to send the entry to another printer. To increase the
frustration the main developer who wrote it is somewhere in Africa on an
road trip and I as jnr on java needs to do the changes.. If any one could
send me an example ill appreciate it... the code that prints to the
default
printer looks something like.
FOUserAgent myUserAgent = fopFactory.newFOUserAgent();
            setBaseUrl(myUserAgent);


            Fop fop = fopFactory.newFop(MimeConstants.MIME_FOP_PRINT,
myUserAgent);
            Result res = new SAXResult(fop.getDefaultHandler());

            TransformerFactory factory = TransformerFactory.newInstance();
            Transformer transformPrint = factory.newTransformer(new
StreamSource(document.getXslFile())); // identity transformer
            transformPrint.setParameter("fop-output-format",
MimeConstants.MIME_FOP_PRINT);
            transformPrint.setParameter("fop-version",Version.getVersion
());

            Source src = new StreamSource(new StringReader(xmlInput));


            // Start XSLT transformation and FOP processing
            transformPrint.transform(src, res);

Thanx

Reply via email to