Creates a new FopTask that transforms the input stream using the given xsltFile and outputs a pdf document to the given output stream. The output can be saved to a file if a FileOutputStream is used. @param inputXmlStream the fop xml input stream @param xsltFile the transform template file, if null
(InputStream inputXmlStream, File xsltFile, OutputStream outputPdf)
| 143 | * @throws FileNotFoundException if xsltFile is not null and does not exist |
| 144 | */ |
| 145 | public static FopTask newFopTask(InputStream inputXmlStream, File xsltFile, OutputStream outputPdf) |
| 146 | throws FileNotFoundException |
| 147 | { |
| 148 | StreamSource xsltSource = createXsltStreamSource(xsltFile); |
| 149 | userAgent = FOP_FACTORY.newFOUserAgent(); |
| 150 | return new FopTask(new StreamSource(inputXmlStream), xsltSource, null, outputPdf); |
| 151 | } |
| 152 | |
| 153 | /** |
| 154 | * Creates a new FopTask that transforms the input stream using the given xsltFile and outputs a |
no test coverage detected