cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@cocoon.zones.apache.org
Subject [DAISY] Updated: PDF Serializer
Date Fri, 19 Aug 2005 20:24:13 GMT
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>
--- &lt;configuration&gt;
+++ <pre>&lt;configuration&gt;
      &lt;fonts&gt;
        &lt;font metrics-file="D:/fop-fonts/arial.ttf.xml" 
              kerning="yes" embed-file="C:/WINNT/Fonts/arial.ttf"&gt;
(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>
--- &lt;map:serializer name="fo2pdf"
+++ <pre>&lt;map:serializer name="fo2pdf"
                    src="org.apache.cocoon.serialization.FOPSerializer"
                    mime-type="application/pdf"/&gt;
    </pre>
    
    <p>and replace it with:</p>
    
--- <pre>
--- &lt;map:serializer name="fo2pdf"
+++ <pre>&lt;map:serializer name="fo2pdf"
                    src="org.apache.cocoon.serialization.FOPSerializer"
                    mime-type="application/pdf"&gt;
      &lt;user-config&gt;D:/fop-fonts/config.xml&lt;/user-config&gt;
(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>&lt;map:serializer name="fo2pdf" src="org.apache.cocoon.serialization.FOPSerializer"
mime-type="application/pdf"&gt;
+++   &lt;renderer-config&gt;
+++      &lt;parameter name="ownerPassword" value="mypassword"/&gt;
+++      &lt;parameter name="allowCopyContent" value="FALSE"/&gt;
+++      &lt;parameter name="allowEditContent" value="FALSE"/&gt;
+++      &lt;parameter name="allowPrint" value="FALSE"/&gt;
+++      &lt;parameter name="allowEditAnnotations" value="FALSE"/&gt;
+++   &lt;/renderer-config&gt;
+++ &lt;/map:serializer&gt;</pre>
+++ 
    </body>
    </html>


Fields
======
no changes

Links
=====
no changes

Custom Fields
=============
no changes

Collections
===========
Removed from collection: legacydocs
Added to collection: documentation

Mime
View raw message