A document has been updated:
http://cocoon.zones.apache.org/daisy/documentation/550.html
Document ID: 550
Branch: main
Language: default
Name: PDF Serializer (unchanged)
Document Type: Document (unchanged)
Updated on: 8/19/05 8:24:02 PM
Updated by: Helma van der Linden
A new version has been created, state: publish
Parts
=====
Content
-------
This part has been updated.
Mime type: text/xml (unchanged)
File name: (unchanged)
Size: 8245 bytes (previous version: 7227 bytes)
Content diff:
(46 equal lines skipped)
<p>Windows:</p>
--- <pre>
--- $ cd %PATH_TO_COCOON%\lib
+++ <pre>$ cd %PATH_TO_COCOON%\lib
$ java -cp
optional\fop-0.20.4.jar;core\xercesImpl-2.0.0.jar;core\xml-apis.jar \
org.apache.fop.fonts.apps.TTFReader \
%PATH_TO_FONT% %PATH_TO_METRICS_DIR%\%FONT_NAME%.xml
</pre>
<p>Unix:</p>
--- <pre>
--- $ cd $PATH_TO_COCOON/lib
+++ <pre>$ cd $PATH_TO_COCOON/lib
$ java -cp
optional/fop-0.20.4.jar;core/xercesImpl-2.0.0.jar;core/xml-apis.jar \
org.apache.fop.fonts.apps.TTFReader \
$PATH_TO_FONT $PATH_TO_METRICS_DIR/$FONT_NAME.xml
(23 equal lines skipped)
<p>Create the metrics for arial.ttf, arialb.ttf, arialbi.ttf, ariali.ttf</p>
--- <pre>
--- $ java -cp
optional\fop-0.20.4.jar;core\xercesImpl-2.0.0.jar;core\xml-apis.jar \
+++ <pre>$ java -cp
optional\fop-0.20.4.jar;core\xercesImpl-2.0.0.jar;core\xml-apis.jar \
org.apache.fop.fonts.apps.TTFReader \
C:\WINNT\Fonts\arial.ttf D:\fop-fonts\arial.ttf.xml
$ java -cp
optional\fop-0.20.4.jar;core\xercesImpl-2.0.0.jar;core\xml-apis.jar \
(20 equal lines skipped)
add other types of fonts (if you want to read the FOP docs) and the
<tt>.ttf</tt> tells me where to locate the font.</p>
--- <pre>
--- <configuration>
+++ <pre><configuration>
<fonts>
<font metrics-file="D:/fop-fonts/arial.ttf.xml"
kerning="yes" embed-file="C:/WINNT/Fonts/arial.ttf">
(29 equal lines skipped)
font is specified as 'ArialMT' (it's proper name) it will still work. Think
of
it as an alias capability.</p>
--- <h2>Sitemap and fo2pdf serializer.</h2>
+++ <h2>Sitemap and fo2pdf serializer</h2>
<p>All that remains is to tell the serializer, where your config file is
located. Find the line in your sitemap which looks like:</p>
--- <pre>
--- <map:serializer name="fo2pdf"
+++ <pre><map:serializer name="fo2pdf"
src="org.apache.cocoon.serialization.FOPSerializer"
mime-type="application/pdf"/>
</pre>
<p>and replace it with:</p>
--- <pre>
--- <map:serializer name="fo2pdf"
+++ <pre><map:serializer name="fo2pdf"
src="org.apache.cocoon.serialization.FOPSerializer"
mime-type="application/pdf">
<user-config>D:/fop-fonts/config.xml</user-config>
(13 equal lines skipped)
config file; <strong>always</strong> delete your cache-dir after modifying
your
config file.</p>
+++ <h2>PDF encryption</h2>
+++
+++ <p>FOP supports encryption of PDF output, thanks to Patrick C. Lankswert.
This
+++ feature is commonly used to prevent unauthorized viewing, printing, editing,
+++ copying text from the document and doing annotations. It is also possible
to ask
+++ the user for a password in order to view the contents.</p>
+++
+++ <h3>How to encrypt pdf</h3>
+++
+++ <p>First install an encryption provider as described in the fop
documentation.
+++ </p>
+++
+++ <p>You can configure the FOPSerializer like this (since 2.1.5-dev):</p>
+++
+++ <pre><map:serializer name="fo2pdf"
src="org.apache.cocoon.serialization.FOPSerializer"
mime-type="application/pdf">
+++ <renderer-config>
+++ <parameter name="ownerPassword" value="mypassword"/>
+++ <parameter name="allowCopyContent" value="FALSE"/>
+++ <parameter name="allowEditContent" value="FALSE"/>
+++ <parameter name="allowPrint" value="FALSE"/>
+++ <parameter name="allowEditAnnotations" value="FALSE"/>
+++ </renderer-config>
+++ </map:serializer></pre>
+++
</body>
</html>
Fields
======
no changes
Links
=====
no changes
Custom Fields
=============
no changes
Collections
===========
Removed from collection: legacydocs
Added to collection: documentation