try {
ByteArrayOutputStream fopout = new ByteArrayOutputStream();
FileOutputStream outfile = new FileOutputStream(args[2]);
- Fop fop = new Fop(Constants.RENDER_PDF);
+ Fop fop = new Fop(MimeConstants.MIME_PDF);
fop.setOutputStream(fopout);
Transformer transformer = TransformerFactory.newInstance().newTransformer(
FOUserAgent userAgent = new FOUserAgent();
useragent.setPDFEncryptionParams(new PDFEncryptionParams(
null, "password", false, false, true, true));
-Fop fop = new Fop(Constants.RENDER_PDF, userAgent);
+Fop fop = new Fop(MimeConstants.MIME_PDF, userAgent);
driver.setOutputStream(...]]></source>
<p>
The parameters for the constructor of PDFEncryptionParams are:
HttpServletResponse response) throws ServletException {
try {
response.setContentType("application/pdf");
- Fop fop = new Fop(Constants.RENDER_PDF);
+ Fop fop = new Fop(MimeConstants.MIME_PDF);
fop.setOutputStream(response.getOutputStream());
TransformerFactory factory = TransformerFactory.newInstance();
Transformer transformer = factory.newTransformer();
[..]
//Setup FOP
- Fop fop = new Fop(Constants.RENDER_PDF);
+ Fop fop = new Fop(MimeConstants.MIME_PDF);
//Setup a buffer to obtain the content length
ByteArrayOutputStream out = new ByteArrayOutputStream();
try {
ByteArrayOutputStream fopout = new ByteArrayOutputStream();
FileOutputStream outfile = new FileOutputStream(args[2]);
- Fop fop = new Fop(Constants.RENDER_PDF);
+ Fop fop = new Fop(MimeConstants.MIME_PDF);
fop.setOutputStream(fopout);
Transformer transformer = TransformerFactory.newInstance().newTransformer(
FOUserAgent userAgent = new FOUserAgent();
useragent.setPDFEncryptionParams(new PDFEncryptionParams(
null, "password", false, false, true, true));
-Fop fop = new Fop(Constants.RENDER_PDF, userAgent);
+Fop fop = new Fop(MimeConstants.MIME_PDF, userAgent);
driver.setOutputStream(...]]></source>
<p>
The parameters for the constructor of PDFEncryptionParams are:
HttpServletResponse response) throws ServletException {
try {
response.setContentType("application/pdf");
- Fop fop = new Fop(Constants.RENDER_PDF);
+ Fop fop = new Fop(MimeConstants.MIME_PDF);
fop.setOutputStream(response.getOutputStream());
TransformerFactory factory = TransformerFactory.newInstance();
Transformer transformer = factory.newTransformer();
[..]
//Setup FOP
- Fop fop = new Fop(Constants.RENDER_PDF);
+ Fop fop = new Fop(MimeConstants.MIME_PDF);
//Setup a buffer to obtain the content length
ByteArrayOutputStream out = new ByteArrayOutputStream();