Have a look at the samplecode at:

   Usage (embedded)

or here inline:

Lukem wrote:
Thank you very much

This is my code:

ByteArrayOutputStream BAout = new ByteArrayOutputStream();
org.apache.fop.apps.Driver driver = new org.apache.fop.apps.Driver();

driver.setRenderer(org.apache.fop.apps.Driver.RENDER_PDF);
driver.setOutputStream(BAout);
this should work:

Map rendererOptions = new java.util.HashMap();
rendererOptions.put("ownerPassword", "mypassword");
rendererOptions.put("allowCopyContent", "FALSE");
rendererOptions.put("allowEditContent", "FALSE");
rendererOptions.put("allowPrint", "FALSE");
driver.getRenderer().setOptions(rendererOptions);


Dirk
driver.render(input.getParser(), input.getInputSource());

File outputFile = new File(filenamePDF);
FileOutputStream outFileWriter = new FileOutputStream(filenamePDF);

byte[] content = BAout.toByteArray();

outFileWriter.write(content);
outFileWriter.flush();
outFileWriter.close();

How can I integrate with the code of the page you redirect me?

thanks
--
View this message in context: 
http://www.nabble.com/Read-only-PDF-with-fop-t1627655.html#a4410423
Sent from the FOP - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to