pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msahy...@apache.org
Subject [6/6] pdfbox-docs git commit: Site checkin for project Apache PDFBox Website
Date Mon, 16 Nov 2015 18:57:41 GMT
Site checkin for project Apache PDFBox Website


Project: http://git-wip-us.apache.org/repos/asf/pdfbox-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/pdfbox-docs/commit/aa929f46
Tree: http://git-wip-us.apache.org/repos/asf/pdfbox-docs/tree/aa929f46
Diff: http://git-wip-us.apache.org/repos/asf/pdfbox-docs/diff/aa929f46

Branch: refs/heads/asf-site
Commit: aa929f46c95f9607589e3e7a4a6f2e24e32ed4b9
Parents: 3f67f8b
Author: Maruan Sahyoun <sahyoun@fileaffairs.de>
Authored: Mon Nov 16 19:57:32 2015 +0100
Committer: Maruan Sahyoun <sahyoun@fileaffairs.de>
Committed: Mon Nov 16 19:57:32 2015 +0100

----------------------------------------------------------------------
 content/1.8/architecture.html                   | 342 +++++++++
 content/1.8/commandline.html                    | 750 +++++++++++++++++++
 content/1.8/cookbook/documentcreation.html      | 240 ++++++
 content/1.8/cookbook/encryption.html            | 221 ++++++
 content/1.8/cookbook/fill-form-field.html       | 234 ++++++
 content/1.8/cookbook/pdfacreation.html          | 239 ++++++
 content/1.8/cookbook/pdfavalidation.html        | 299 ++++++++
 content/1.8/cookbook/rendering.html             | 233 ++++++
 content/1.8/cookbook/textextraction.html        | 320 ++++++++
 .../1.8/cookbook/workingwithattachments.html    | 240 ++++++
 content/1.8/cookbook/workingwithfonts.html      | 355 +++++++++
 content/1.8/cookbook/workingwithmetadata.html   | 248 ++++++
 content/1.8/dependencies.html                   | 288 +++++++
 content/1.8/faq.html                            | 320 ++++++++
 content/2.0/commandline.html                    | 695 +++++++++++++++++
 content/2.0/cookbook/encryption.html            | 221 ++++++
 content/2.0/dependencies.html                   | 247 ++++++
 content/2.0/examples.html                       | 199 +++++
 content/2.0/getting-started.html                | 220 ++++++
 content/2.0/migration.html                      | 369 +++++++++
 content/building.html                           | 264 +++++++
 content/codingconventions.html                  | 306 ++++++++
 content/errors/403.html                         | 206 +++++
 content/errors/404.html                         | 206 +++++
 content/ideas.html                              | 280 +++++++
 content/index.html                              | 256 +++++++
 content/mailinglists.html                       | 251 +++++++
 content/references.html                         | 360 +++++++++
 content/siteupdate.html                         | 263 +++++++
 content/support.html                            | 247 ++++++
 content/team.html                               | 318 ++++++++
 31 files changed, 9237 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/aa929f46/content/1.8/architecture.html
----------------------------------------------------------------------
diff --git a/content/1.8/architecture.html b/content/1.8/architecture.html
new file mode 100644
index 0000000..8f33bbe
--- /dev/null
+++ b/content/1.8/architecture.html
@@ -0,0 +1,342 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<!--
+     
+     Licensed to the Apache Software Foundation (ASF) under one or more
+     contributor license agreements.  See the NOTICE file distributed with
+     this work for additional information regarding copyright ownership.
+     The ASF licenses this file to You under the Apache License, Version 2.0
+     (the "License"); you may not use this file except in compliance with
+     the License.  You may obtain a copy of the License at
+     
+     http://www.apache.org/licenses/LICENSE- 2.0
+     
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+     -->
+
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+    <meta name="description" content="The Apache PDFBox™ library is an open source Java tool for working with PDF documents. This project allows creation of new PDF documents, manipulation of existing documents and the ability to extract content from documents. Apache PDFBox also includes several command line utilities. Apache PDFBox is published under the Apache License v2.0.
+">
+
+    <title>Apache PDFBox | Architecture</title>
+
+    <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">
+    <link href="/assets/open-iconic/font/css/open-iconic-bootstrap.min.css" rel="stylesheet">
+    <link href="/css/pygments-github.css" rel="stylesheet">
+    
+    <link href="/css/site.css" rel="stylesheet">
+    
+    
+    
+     
+    
+    
+
+</head>
+
+<body>
+    <nav class="navbar navbar-default navbar-top">
+      <div class="container">
+        <div class="navbar-header">
+          <a href="/index.html">
+            <img class="logo" src="/images/logo-head.gif">
+          </a>
+          <p class="pull-right visible-xs">
+            <button type="button" class="btn btn-primary btn-sm" data-toggle="offcanvas">Menu</button>
+          </p>
+        </div>
+      </div>
+    </nav>
+    
+    <div class="container">
+        
+        <div class="row row-offcanvas row-offcanvas-left">
+            <div class="col-xs-6 col-sm-3 sidebar-offcanvas" id="sidebar">
+                
+                <ul class="sidebar">
+                    <li class="sidebar-header">Apache PDFBox</li>
+                    <li><a href="/index.html">Overview</a></li>
+                    <li><a href="/download.cgi">Downloads</a></li>
+                    
+                    <li class="sidebar-header">Community</li>
+                    <li><a href="/support.html">Support</a></li>
+                    <li><a href="/mailinglists.html">Mailing Lists</a></li>
+                    <li><a href="/team.html">Project Team</a></li>
+                    
+                    <li class="sidebar-header">Documentation</li>
+                    <li class="sidebar-node" id="v2-0">
+                        <a href="#">2.0.0 (trunk)</a>
+                        <ul>
+                            <li><a href="/2.0/migration.html">Migration Guide</a></li>
+                            <li><a href="/2.0/getting-started.html">Getting Started</a></li>
+                            <li><a href="/2.0/examples.html">Examples</a></li>
+                            <li><a href="/2.0/dependencies.html">Dependencies</a></li>
+                            <li class="sidebar-node" id="v2-0-cookbook">
+                                <a href="#">Cookbook</a>
+                                <ul>
+                                    <li><a href="/2.0/cookbook/encryption.html">Document Encryption</a></li>
+                                </ul>
+                            </li>
+                            <li><a href="/2.0/commandline.html">Command Line Tools</a></li>
+                            <li><a href="/docs/2.0.0-SNAPSHOT/javadocs/">API Docs</a></li>
+                        </ul>
+                    </li>
+                    <li class="sidebar-node" id="v1-8">
+                        <a href="#">1.8.10</a>
+                        <ul>
+                            <li><a href="/1.8/architecture.html">Architecture</a></li>
+                            <li><a href="/1.8/dependencies.html">Dependencies</a></li>
+                            <li class="sidebar-node" id="v1-8-cookbook">
+                                <a href="#">Cookbook</a>
+                                <ul>
+                                    <li><a href="/1.8/cookbook/documentcreation.html">Document Creation</a></li>
+                                    <li><a href="/1.8/cookbook/textextraction.html">Text Extraction</a></li>
+                                    <li><a href="/1.8/cookbook/encryption.html">Document Encryption</a></li>
+                                    <li><a href="/1.8/cookbook/workingwithfonts.html">Working with Fonts</a></li>
+                                    <li><a href="/1.8/cookbook/workingwithmetadata.html">Working with Metadata</a></li>
+                                    <li><a href="/1.8/cookbook/workingwithattachments.html">Working with Attachments</a></li>
+                                    <li><a href="/1.8/cookbook/pdfavalidation.html">PDF/A Validation</a></li>
+                                    <li><a href="/1.8/cookbook/pdfacreation.html">Creating a PDF/A document</a></li>
+                                </ul>
+                            </li>
+                            <li><a href="/1.8/commandline.html">Command Line Tools</a></li>
+                            <li><a href="/docs/1.8.10/javadocs/">API Docs</a></li>
+                            <li><a href="/1.8/faq.html">FAQ</a></li>
+                        </ul>
+                    </li>
+                    
+                    <li class="sidebar-header">Development</li>
+                    <li><a href="/building.html">Building from Source</a></li>
+                    <li><a href="/codingconventions.html">Coding Conventions</a></li>
+                    <li><a href="/siteupdate.html">Update the Website</a></li>  
+                    <li><a href="https://builds.apache.org/view/All/job/PDFBox-trunk/">Jenkins</a></li>
+                    <li><a href="https://travis-ci.org/apache/pdfbox">Travis CI</a></li>
+                    <li><a href="https://analysis.apache.org/dashboard/index/org.apache.pdfbox:pdfbox-reactor">SonarQube</a></li>
+                    <li><a href="https://issues.apache.org/jira/browse/PDFBOX">JIRA</a></li>
+                    <li><a href="/ideas.html">Ideas</a></li>
+                    <li><a href="/references.html">External Links</a></li>
+
+                    <li class="sidebar-header">Apache Software Foundation</li>
+                    <li><a href="http://www.apache.org/">Apache Software Foundation</a></li>
+                    <li><a href="http://www.apache.org/foundation/thanks.html">ASF Sponsors</a></li>
+                    <li><a href="http://www.apache.org/security/">Security</a></li>
+                </ul>
+            </div>
+            <div class="col-xs-12 col-sm-9">
+                <h1 id="architecture">Architecture</h1>
+
+<p>In order to get the most out of PDFBox it is neccessary to understand how a PDF document
+is organized as PDFBox was architected around the concepts layed out in the 
+ISO-32000 (PDF) Specification</p>
+
+<ul>
+<li><a href="http://www.iso.org/iso/catalogue_detail.htm?csnumber=51502">ISO Site</a></li>
+<li><a href="http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/PDF32000_2008.pdf">Adobe Version</a></li>
+</ul>
+
+<h2 id="quick-introduction-to-the-pdf-format">Quick Introduction to the PDF format</h2>
+
+<p>A PDF file is made up of a sequence of bytes. These bytes, grouped into tokens, 
+make up the basic objects upon which higher level objects and structures are built [see ISO-32000 7.3].</p>
+
+<p class="alert alert-info">PDFBox makes these basic objects available in the 
+*org.apache.pdfbox.cos* package (The COS Model).
+</p>
+
+<p>The organization of these objects, how to they are read and how to write them is defined in the file structure of the 
+PDF [see ISO-32000 7.5]. In addition a file can be encrpyted to protect the document&#39;s content [see ISO-32000 7.5].</p>
+
+<p class="alert alert-info">PDFBox handles the reading in the *org.apache.pdfbox.pdfparser* package. 
+Writing of PDF files is handled in the *org.apache.pdfbox.pdfwriter* package.
+</p>
+
+<p>Within the file structure basic objects are used to create a document structure building higher level objects such 
+as pages, bookmarks, annotations [see ISO-32000 7.7].</p>
+
+<p class="alert alert-info">PDFBox makes these higher level objects available through the 
+*org.apache.pdfbox.pdfmodel* package (The PD Model).
+</p> 
+
+<p>In addition there is a COS representation available for the PD model if there is a need to 
+inspect the underlying structure or to handle special cases where the higher level PD model
+doesn&#39;t provide the functionality needed.</p>
+
+<p class="alert alert-info">It's always the COS model which is represented in the PDF file.</p>
+
+<h2 id="the-cos-model">The COS Model</h2>
+
+<p>As outlined above the basic PDF objects are represented in PDFBox in the org.apache.pdfbox.cos package.</p>
+
+<table><thead>
+<tr>
+<th>PDF Type</th>
+<th>Description</th>
+<th>Example</th>
+<th>PDFBox class</th>
+<th>ISO 32000</th>
+</tr>
+</thead><tbody>
+<tr>
+<td>Boolean</td>
+<td>Standard True/False values</td>
+<td>true</td>
+<td>org.apache.pdfbox.cos.COSBoolean</td>
+<td>7.3.2</td>
+</tr>
+<tr>
+<td>Number</td>
+<td>Integer and floating point numbers</td>
+<td>1 2.3</td>
+<td>org.apache.pdfbox.cos.COSInteger<br/>org.apache.pdfbox.cos.COSFloat</td>
+<td>7.3.3</td>
+</tr>
+<tr>
+<td>String</td>
+<td>A sequence of characters</td>
+<td>(This is a string)</td>
+<td>org.apache.pdfbox.cos.COSString</td>
+<td>7.3.4</td>
+</tr>
+<tr>
+<td>Name</td>
+<td>A predefined value in a PDF document, typically used as a key in a dictionary</td>
+<td>/Type</td>
+<td>org.apache.pdfbox.cos.COSName</td>
+<td>7.3.5</td>
+</tr>
+<tr>
+<td>Array</td>
+<td>Arrays are one-dimensional lists of objects accessed by a numeric index. Within an array each basic object is permitted as an entry.</td>
+<td>[549 3.14 false (Ralph) /SomeName]</td>
+<td>org.apache.pdfbox.cos.COSArray</td>
+<td>7.3.6</td>
+</tr>
+<tr>
+<td>Dictionary</td>
+<td>A map of name value pairs</td>
+<td>&lt;&lt;<br/>/Type /XObject<br/>/Name (Name)</br>/Size 1</br>&gt;&gt;</td>
+<td>org.apache.pdfbox.cos.COSDictionary</td>
+<td>7.3.7</td>
+</tr>
+<tr>
+<td>Stream</td>
+<td>A stream of data, typically compressed. This is used for page contents, images and embedded font streams.</td>
+<td>12 0 obj &lt;&lt; /Type /XObject &gt;&gt; stream 030004040404040404 endstream</td>
+<td>org.apache.pdfbox.cos.COSStream</td>
+<td>7.3.8</td>
+</tr>
+<tr>
+<td>Object</td>
+<td>A wrapper to any of the other objects, this can be used to reference an object multiple times. An object is referenced by using two numbers, an object number and a generation number. Initially the generation number will be zero unless the object got replaced later in the stream.</td>
+<td>12 0 obj &lt;&lt; /Type /XObject &gt;&gt; endobj</td>
+<td>org.apache.pdfbox.cos.COSObject</td>
+<td></td>
+</tr>
+</tbody></table>
+
+<p>A page in a pdf document is represented with a COSDictionary. The entries that are available for a page can be seen in the PDF Reference and an example of a page looks like this:</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">&lt;&lt;
+    /Type /Page
+    /MediaBox [0 0 612 915]
+    /Contents 56 0 R
+&gt;&gt;
+</code></pre></div>
+<p>The information within the dictionary can be accessed using the COS model</p>
+<div class="highlight"><pre><code class="language-java" data-lang="java"><span class="n">COSDictionary</span> <span class="n">page</span> <span class="o">=</span> <span class="o">...;</span>
+<span class="n">COSArray</span> <span class="n">mediaBox</span> <span class="o">=</span> <span class="o">(</span><span class="n">COSArray</span><span class="o">)</span><span class="n">page</span><span class="o">.</span><span class="na">getDictionaryObject</span><span class="o">(</span> <span class="s">"MediaBox"</span> <span class="o">);</span>
+<span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span> <span class="s">"Width:"</span> <span class="o">+</span> <span class="n">mediaBox</span><span class="o">.</span><span class="na">get</span><span class="o">(</span> <span class="mi">3</span> <span class="o">)</span> <span class="o">);</span>
+</code></pre></div>
+<p>As can be seen from that little example the COS model provides a low level API to access 
+information within the PDF. In order to use the COS model successfully a good knowledge of
+the PDF specification is needed.</p>
+
+<h2 id="the-pd-model">The PD Model</h2>
+
+<p>The COS Model allows access to all aspects of a PDF document. This type of programming is
+tedious and error prone though because the user must know all of the names of the
+parameters and no helper methods are available. The PD Model was created to help
+alleviate this problem. Each type of object(page, font, image) has a set of defined
+attributes that can be available in the dictionary. 
+A PD Model class is available for each of these so that strongly typed methods are
+available to access the attributes. </p>
+
+<p>The same code from above to get the page width can be rewritten to use PD Model classes.</p>
+<div class="highlight"><pre><code class="language-java" data-lang="java"><span class="n">PDPage</span> <span class="n">page</span> <span class="o">=</span> <span class="o">...;</span>
+<span class="n">PDRectangle</span> <span class="n">mediaBox</span> <span class="o">=</span> <span class="n">page</span><span class="o">.</span><span class="na">getMediaBox</span><span class="o">();</span>
+<span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span> <span class="s">"Width:"</span> <span class="o">+</span> <span class="n">mediaBox</span><span class="o">.</span><span class="na">getWidth</span><span class="o">()</span> <span class="o">);</span>
+</code></pre></div>
+<p>PD Model objects sit on top of COS model. Typically, the classes in the PD Model will only
+store a COS object and all setter/getter methods will modify data that is stored in the
+COS object. For example, when you call PDPage.getLastModified() the method will do a
+lookup in the COSDictionary with the key &quot;LastModified&quot;, if it is found the value is then
+converter to a java.util.Calendar. When PDPage.setLastModified( Calendar ) is called then
+the Calendar is converted to a string in the COSDictionary.</p>
+
+            </div>
+        </div>
+    </div>
+
+    <footer class="footer">
+        <div class="container"
+            <div class="row">
+                <div class="span3">
+                    <!-- nothing in here on purpose -->
+                </div>
+                <div class="span9">
+                    <p>Copyright © 2009&ndash;2015 <a href="http://www.apache.org/">The Apache Software Foundation</a>, Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+                        <br/>Apache PDFBox, PDFBox, Apache, the Apache feather logo and the Apache PDFBox project logos are trademarks of The Apache Software Foundation.</p>
+                </div>
+            </div>
+        </div>
+    </footer>
+
+        <!-- Twitter Bootstrap and jQuery after this line. -->
+    <script src="//code.jquery.com/jquery-latest.js"></script>
+    <script src="/bootstrap/js/bootstrap.min.js"></script>
+    <script type="text/javascript">
+        
+        $(document).ready(function () {
+                $('[data-toggle="offcanvas"]').click(function () {
+                $('.row-offcanvas').toggleClass('active')
+            });
+        });
+        
+        $(function() {
+            // collapse tree nodes dynamically to support noscript
+            $('.sidebar-node').addClass('collapsed');
+            
+
+            // toggle expand/collapse
+            $('.sidebar-node > a').click(function(e) {
+                $(this).parent().toggleClass('collapsed');
+                e.preventDefault();
+            });
+
+            // preserve expand/collapse across page navigation
+            var path = document.location.pathname;
+            if (path.indexOf('/2.0') == 0) {
+                $('#v2-0').removeClass('collapsed');
+                if (path.indexOf('/2.0/cookbook') == 0) {
+                    $('#v2-0-cookbook').removeClass('collapsed');
+                }
+            } else {
+                $('#v1-8').removeClass('collapsed');
+                if (path.indexOf('/1.8/cookbook') == 0) {
+                    $('#v1-8-cookbook').removeClass('collapsed');
+                }
+            }
+
+        });
+    </script>
+
+</body>
+
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/aa929f46/content/1.8/commandline.html
----------------------------------------------------------------------
diff --git a/content/1.8/commandline.html b/content/1.8/commandline.html
new file mode 100644
index 0000000..61e2930
--- /dev/null
+++ b/content/1.8/commandline.html
@@ -0,0 +1,750 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<!--
+     
+     Licensed to the Apache Software Foundation (ASF) under one or more
+     contributor license agreements.  See the NOTICE file distributed with
+     this work for additional information regarding copyright ownership.
+     The ASF licenses this file to You under the Apache License, Version 2.0
+     (the "License"); you may not use this file except in compliance with
+     the License.  You may obtain a copy of the License at
+     
+     http://www.apache.org/licenses/LICENSE- 2.0
+     
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+     -->
+
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+    <meta name="description" content="The Apache PDFBox™ library is an open source Java tool for working with PDF documents. This project allows creation of new PDF documents, manipulation of existing documents and the ability to extract content from documents. Apache PDFBox also includes several command line utilities. Apache PDFBox is published under the Apache License v2.0.
+">
+
+    <title>Apache PDFBox | Command Line Tools</title>
+
+    <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">
+    <link href="/assets/open-iconic/font/css/open-iconic-bootstrap.min.css" rel="stylesheet">
+    <link href="/css/pygments-github.css" rel="stylesheet">
+    
+    <link href="/css/site.css" rel="stylesheet">
+    
+    
+    
+     
+    
+    
+
+</head>
+
+<body>
+    <nav class="navbar navbar-default navbar-top">
+      <div class="container">
+        <div class="navbar-header">
+          <a href="/index.html">
+            <img class="logo" src="/images/logo-head.gif">
+          </a>
+          <p class="pull-right visible-xs">
+            <button type="button" class="btn btn-primary btn-sm" data-toggle="offcanvas">Menu</button>
+          </p>
+        </div>
+      </div>
+    </nav>
+    
+    <div class="container">
+        
+        <div class="row row-offcanvas row-offcanvas-left">
+            <div class="col-xs-6 col-sm-3 sidebar-offcanvas" id="sidebar">
+                
+                <ul class="sidebar">
+                    <li class="sidebar-header">Apache PDFBox</li>
+                    <li><a href="/index.html">Overview</a></li>
+                    <li><a href="/download.cgi">Downloads</a></li>
+                    
+                    <li class="sidebar-header">Community</li>
+                    <li><a href="/support.html">Support</a></li>
+                    <li><a href="/mailinglists.html">Mailing Lists</a></li>
+                    <li><a href="/team.html">Project Team</a></li>
+                    
+                    <li class="sidebar-header">Documentation</li>
+                    <li class="sidebar-node" id="v2-0">
+                        <a href="#">2.0.0 (trunk)</a>
+                        <ul>
+                            <li><a href="/2.0/migration.html">Migration Guide</a></li>
+                            <li><a href="/2.0/getting-started.html">Getting Started</a></li>
+                            <li><a href="/2.0/examples.html">Examples</a></li>
+                            <li><a href="/2.0/dependencies.html">Dependencies</a></li>
+                            <li class="sidebar-node" id="v2-0-cookbook">
+                                <a href="#">Cookbook</a>
+                                <ul>
+                                    <li><a href="/2.0/cookbook/encryption.html">Document Encryption</a></li>
+                                </ul>
+                            </li>
+                            <li><a href="/2.0/commandline.html">Command Line Tools</a></li>
+                            <li><a href="/docs/2.0.0-SNAPSHOT/javadocs/">API Docs</a></li>
+                        </ul>
+                    </li>
+                    <li class="sidebar-node" id="v1-8">
+                        <a href="#">1.8.10</a>
+                        <ul>
+                            <li><a href="/1.8/architecture.html">Architecture</a></li>
+                            <li><a href="/1.8/dependencies.html">Dependencies</a></li>
+                            <li class="sidebar-node" id="v1-8-cookbook">
+                                <a href="#">Cookbook</a>
+                                <ul>
+                                    <li><a href="/1.8/cookbook/documentcreation.html">Document Creation</a></li>
+                                    <li><a href="/1.8/cookbook/textextraction.html">Text Extraction</a></li>
+                                    <li><a href="/1.8/cookbook/encryption.html">Document Encryption</a></li>
+                                    <li><a href="/1.8/cookbook/workingwithfonts.html">Working with Fonts</a></li>
+                                    <li><a href="/1.8/cookbook/workingwithmetadata.html">Working with Metadata</a></li>
+                                    <li><a href="/1.8/cookbook/workingwithattachments.html">Working with Attachments</a></li>
+                                    <li><a href="/1.8/cookbook/pdfavalidation.html">PDF/A Validation</a></li>
+                                    <li><a href="/1.8/cookbook/pdfacreation.html">Creating a PDF/A document</a></li>
+                                </ul>
+                            </li>
+                            <li><a href="/1.8/commandline.html">Command Line Tools</a></li>
+                            <li><a href="/docs/1.8.10/javadocs/">API Docs</a></li>
+                            <li><a href="/1.8/faq.html">FAQ</a></li>
+                        </ul>
+                    </li>
+                    
+                    <li class="sidebar-header">Development</li>
+                    <li><a href="/building.html">Building from Source</a></li>
+                    <li><a href="/codingconventions.html">Coding Conventions</a></li>
+                    <li><a href="/siteupdate.html">Update the Website</a></li>  
+                    <li><a href="https://builds.apache.org/view/All/job/PDFBox-trunk/">Jenkins</a></li>
+                    <li><a href="https://travis-ci.org/apache/pdfbox">Travis CI</a></li>
+                    <li><a href="https://analysis.apache.org/dashboard/index/org.apache.pdfbox:pdfbox-reactor">SonarQube</a></li>
+                    <li><a href="https://issues.apache.org/jira/browse/PDFBOX">JIRA</a></li>
+                    <li><a href="/ideas.html">Ideas</a></li>
+                    <li><a href="/references.html">External Links</a></li>
+
+                    <li class="sidebar-header">Apache Software Foundation</li>
+                    <li><a href="http://www.apache.org/">Apache Software Foundation</a></li>
+                    <li><a href="http://www.apache.org/foundation/thanks.html">ASF Sponsors</a></li>
+                    <li><a href="http://www.apache.org/security/">Security</a></li>
+                </ul>
+            </div>
+            <div class="col-xs-12 col-sm-9">
+                <h1 id="command-line-tools">Command Line Tools</h1>
+
+<p>PDFBox comes with a series of command line utilities. They are available as standard Java applications.</p>
+
+<p>See the Dependencies page for instructions on how to set your classpath in order to run 
+PDFBox tools as Java applications.</p>
+
+<p><strong>Table of Contents</strong><br>
+<a href="#decrypt">Decrypt</a>
+<a href="#encrypt">Encrypt</a>
+<a href="#extracttext">ExtractText</a> 
+<a href="#overlaypdf">OverlayPDF</a>
+<a href="#printpdf">PrintPDF</a>
+<a href="#pdfdebugger">PDFDebugger</a>
+<a href="#pdfreader">PDFReader</a>
+<a href="#pdfmerger">PDFMerger</a>
+<a href="#pdfsplit">PDFSplit</a>
+<a href="#pdftoimage">PDFToImage</a>
+<a href="#texttopdf">TextToPDF</a>
+<a href="#writedecodeddoc">WriteDecodedDoc</a></p>
+
+<h2 id="decrypt">Decrypt</h2>
+
+<p>This application will decrypt a PDF document.</p>
+
+<p>NOTE: You must have the owner password to decrypt the document!</p>
+
+<p>usage: <code>java -jar pdfbox-app-x.y.z.jar Decrypt [OPTIONS] &lt;inputfile&gt; [outputfile]</code></p>
+
+<table><thead>
+<tr>
+<th>Command Line Parameter</th>
+<th>Description</th>
+</tr>
+</thead><tbody>
+<tr>
+<td>-password</td>
+<td>Password to the PDF or certificate in keystore.</td>
+</tr>
+<tr>
+<td>-keyStore</td>
+<td>Path to keystore that holds certificate to decrypt the document. This is only required if the document is encrypted with a certificate, otherwise only the password is required.</td>
+</tr>
+<tr>
+<td>-alias</td>
+<td>The alias to the certificate in the keystore.</td>
+</tr>
+<tr>
+<td>inputfile</td>
+<td>The PDF file to decrypt.</td>
+</tr>
+<tr>
+<td>outputfile</td>
+<td>The file to save the decrypted document to. If left blank then it will be the same as the input file.</td>
+</tr>
+</tbody></table>
+
+<h2 id="encrypt">Encrypt</h2>
+
+<p>This application will encrypt a PDF document.</p>
+
+<p>usage: <code>java -jar pdfbox-app-x.y.z.jar Encrypt [OPTIONS] &lt;password&gt; &lt;inputfile&gt;</code></p>
+
+<table><thead>
+<tr>
+<th>Command Line Parameter</th>
+<th>Default</th>
+<th>Description</th>
+</tr>
+</thead><tbody>
+<tr>
+<td>-O</td>
+<td></td>
+<td>The owner password to the PDF, ignored if -certFile is specified.</td>
+</tr>
+<tr>
+<td>-U</td>
+<td></td>
+<td>The user password to the PDF, ignored if -certFile is specified.</td>
+</tr>
+<tr>
+<td>-certFile</td>
+<td></td>
+<td>Path to X.509 cert file.</td>
+</tr>
+<tr>
+<td>-canAssemble</td>
+<td>true</td>
+<td>Set the assemble permission.</td>
+</tr>
+<tr>
+<td>-canExtractContent</td>
+<td>true</td>
+<td>Set the extraction permission.</td>
+</tr>
+<tr>
+<td>-canExtractForAccessibility</td>
+<td>true</td>
+<td>Set the extraction permission.</td>
+</tr>
+<tr>
+<td>-canFillInForm</td>
+<td>true</td>
+<td>Set the fill in form permission.</td>
+</tr>
+<tr>
+<td>-canModify</td>
+<td>true</td>
+<td>Set the modify permission.</td>
+</tr>
+<tr>
+<td>-canModifyAnnotations</td>
+<td>true</td>
+<td>Set the modify annots permission.</td>
+</tr>
+<tr>
+<td>-canPrint</td>
+<td>true</td>
+<td>Set the print permission.</td>
+</tr>
+<tr>
+<td>-canPrintDegraded</td>
+<td>true</td>
+<td>Set the print degraded permission.</td>
+</tr>
+<tr>
+<td>-keyLength</td>
+<td>40 or 128</td>
+<td>The number of bits for the encryption key. For 128 bits <a href="http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html">Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files</a> must be installed.</td>
+</tr>
+<tr>
+<td>inputfile</td>
+<td></td>
+<td>The PDF file to encrypt.</td>
+</tr>
+<tr>
+<td>outputfile</td>
+<td></td>
+<td>The file to save the encrypted document to. If left blank then it will be the same as the input file.</td>
+</tr>
+</tbody></table>
+
+<h2 id="extracttext">ExtractText</h2>
+
+<p>This application will extract all text from the given PDF document.</p>
+
+<p>usage: <code>java -jar pdfbox-app-x.y.z.jar ExtractText [OPTIONS] &lt;inputfile&gt; [Text file]</code></p>
+
+<table><thead>
+<tr>
+<th>Command Line Parameter</th>
+<th>Default</th>
+<th>Description</th>
+</tr>
+</thead><tbody>
+<tr>
+<td>-password</td>
+<td></td>
+<td>The password to the PDF document.</td>
+</tr>
+<tr>
+<td>-encoding</td>
+<td>default encoding</td>
+<td>The encoding type of the text file, e.g. ISO-8859-1, UTF-8, UTF-16BE.</td>
+</tr>
+<tr>
+<td>-console</td>
+<td>false</td>
+<td>Send text to console instead of file.</td>
+</tr>
+<tr>
+<td>-html</td>
+<td>false</td>
+<td>Output in HTML format instead of raw text.</td>
+</tr>
+<tr>
+<td>-sort</td>
+<td>false</td>
+<td>Sort the text before writing.</td>
+</tr>
+<tr>
+<td>-ignoreBeads</td>
+<td>false</td>
+<td>Disables the separation by beads.</td>
+</tr>
+<tr>
+<td>-force</td>
+<td>false</td>
+<td>Enables pdfbox to ignore corrupt objects.</td>
+</tr>
+<tr>
+<td>-debug</td>
+<td>false</td>
+<td>Enables debug output about the time consumption of every stage.</td>
+</tr>
+<tr>
+<td>-startPage</td>
+<td>1</td>
+<td>The first page to extract, one based.</td>
+</tr>
+<tr>
+<td>-endPage</td>
+<td>Integer.MAX_INT</td>
+<td>The last page to extract, one based.</td>
+</tr>
+<tr>
+<td>-nonSeq</td>
+<td>false</td>
+<td>Use the new non sequential parser.</td>
+</tr>
+</tbody></table>
+
+<h2 id="overlaypdf">OverlayPDF</h2>
+
+<p>This application will overlay one document with the content of another document</p>
+
+<p>usage: <code>java -jar pdfbox-app-x.y.z.jar OverlayPDF &lt;input.pdf&gt; [OPTIONS] &lt;output.pdf&gt;</code></p>
+
+<table><thead>
+<tr>
+<th>Command Line Parameter</th>
+<th>Default</th>
+<th>Description</th>
+</tr>
+</thead><tbody>
+<tr>
+<td>inputfile</td>
+<td></td>
+<td>The PDF file to be overlayed.</td>
+</tr>
+<tr>
+<td>defaultOverlay.pdf</td>
+<td></td>
+<td>Default overlay file.</td>
+</tr>
+<tr>
+<td>-odd oddPageOverlay.pdf</td>
+<td></td>
+<td>Overlay file used for odd pages.</td>
+</tr>
+<tr>
+<td>-even evenPageOverlay.pdf</td>
+<td></td>
+<td>Overlay file used for even pages.</td>
+</tr>
+<tr>
+<td>-first firstPageOverlay.pdf</td>
+<td></td>
+<td>Overlay file used for the first page.</td>
+</tr>
+<tr>
+<td>-last lastPageOverlay.pdf</td>
+<td></td>
+<td>Overlay file used for the last pages.</td>
+</tr>
+<tr>
+<td>-page pageNumber specificPageOverlay.pdf</td>
+<td></td>
+<td>overlay file used for the given page number, may occur more than once.</td>
+</tr>
+<tr>
+<td>-position</td>
+<td>background</td>
+<td>Where to put the overlay, foreground or background.</td>
+</tr>
+<tr>
+<td>-nonSeq</td>
+<td>false</td>
+<td>Use the new non sequential parser.</td>
+</tr>
+<tr>
+<td>outputfile</td>
+<td></td>
+<td>The resulting pdf file.</td>
+</tr>
+</tbody></table>
+
+<p>Examples:</p>
+
+<ul>
+<li>OverlayPDF input.pdf overlay.pdf -nonSeq output.pdf</li>
+<li>OverlayPDF input.pdf defaultOverlay.pdf -page 10 overlayForPage10.pdf -position foreground -nonSeq output.pdf</li>
+<li>OverlayPDF input.pdf -odd oddOverlay.pdf -even evenOverlay.pdf -nonSeq output.pdf</li>
+</ul>
+
+<h2 id="printpdf">PrintPDF</h2>
+
+<p>This application will send a pdf document to the printer.</p>
+
+<p class="alert alert-info">You must have the correct permissions to print the document!</p>
+
+<p>usage: <code>java -jar pdfbox-app-x.y.z.jar PrintPDF [OPTIONS] &lt;inputfile&gt;</code></p>
+
+<table><thead>
+<tr>
+<th>Command Line Parameter</th>
+<th>Description</th>
+</tr>
+</thead><tbody>
+<tr>
+<td>-password</td>
+<td>The password to decrypt the PDF.</td>
+</tr>
+<tr>
+<td>-silentPrint</td>
+<td>Print the PDF without prompting for a printer.</td>
+</tr>
+<tr>
+<td>inputfile</td>
+<td>The PDF file to print.</td>
+</tr>
+</tbody></table>
+
+<h2 id="pdfdebugger">PDFDebugger</h2>
+
+<p>This application will take an existing PDF document and allows to analyze and inspect the internal structure</p>
+
+<p>usage: <code>java -jar pdfbox-app-x.y.z.jar PDFDebugger [inputfile]</code></p>
+
+<table><thead>
+<tr>
+<th>Command Line Parameter</th>
+<th>Default</th>
+<th>Description</th>
+</tr>
+</thead><tbody>
+<tr>
+<td>-password</td>
+<td></td>
+<td>The password to the PDF document.</td>
+</tr>
+<tr>
+<td>-nonSeq</td>
+<td>false</td>
+<td>Use the new non sequential parser.</td>
+</tr>
+<tr>
+<td>inputfile</td>
+<td></td>
+<td>the name of an optional PDF file to open.</td>
+</tr>
+</tbody></table>
+
+<h2 id="pdfreader">PDFReader</h2>
+
+<p>An application to read PDF documents. This will provide Acrobat Reader like functionality.</p>
+
+<p>usage: <code>java -jar pdfbox-app-x.y.z.jar PDFReader [PDF file]</code></p>
+
+<table><thead>
+<tr>
+<th>Command Line Parameter</th>
+<th>Default</th>
+<th>Description</th>
+</tr>
+</thead><tbody>
+<tr>
+<td>-password</td>
+<td></td>
+<td>The password to the PDF document.</td>
+</tr>
+<tr>
+<td>-nonSeq</td>
+<td>false</td>
+<td>Use the new non sequential parser.</td>
+</tr>
+<tr>
+<td>PDF file</td>
+<td></td>
+<td>the name of an optional PDF file to open</td>
+</tr>
+</tbody></table>
+
+<h2 id="pdfmerger">PDFMerger</h2>
+
+<p>This application will take a list of pdf documents and merge them, saving the result in a new document.</p>
+
+<p>usage: <code>java -jar pdfbox-app-x.y.z.jar PDFMerger &lt;Source PDF files (2 ..n)&gt; &lt;Target PDF file&gt;</code></p>
+
+<h2 id="pdfsplit">PDFSplit</h2>
+
+<p>This application will take an existing PDF document and split it into a number of other documents</p>
+
+<p>usage: <code>java -jar pdfbox-app-x.y.z.jar PDFSplit [OPTIONS] &lt;PDF file&gt;</code></p>
+
+<table><thead>
+<tr>
+<th>Command Line Parameter</th>
+<th>Default</th>
+<th>Description</th>
+</tr>
+</thead><tbody>
+<tr>
+<td>-password</td>
+<td></td>
+<td>The password to the PDF document.</td>
+</tr>
+<tr>
+<td>-split</td>
+<td></td>
+<td>Number of pages of every splitted part of the pdf.</td>
+</tr>
+<tr>
+<td>-startPage</td>
+<td></td>
+<td>The page to start at.</td>
+</tr>
+<tr>
+<td>-endPage</td>
+<td></td>
+<td>The page to stop at.</td>
+</tr>
+<tr>
+<td>-nonSeq</td>
+<td>false</td>
+<td>Use the new non sequential parser.</td>
+</tr>
+</tbody></table>
+
+<p>Examples:</p>
+
+<ul>
+<li>PDFSplit -split 2 sample_with_13_pages.pdf will split the pdf in pieces of 2 pages each except the last which will contain 1 page only.</li>
+<li>PDFSplit -startPage 5 sample_with_13_pages.pdf will provide a pdf containing all pages of the source pdf starting at page 5</li>
+<li>PDFSplit -startPage 5 -endPage 10 sample_with_13_pages.pdf will provide a pdf containing all pages from 5 to 10 of the source pdf</li>
+<li>PDFSplit -split 2 -startPage 5 -endPage 10 sample_with_13_pages.pdf will provide 3 pdfs containing all pages from 5 to 10 of the source pdf 2 pages each</li>
+</ul>
+
+<h2 id="pdftoimage">PDFToImage</h2>
+
+<p>This application will create an image for every page in the PDF document.</p>
+
+<p>usage: <code>java -jar pdfbox-app-x.y.z.jar PDFToImage [OPTIONS] &lt;PDF file&gt;</code></p>
+
+<table><thead>
+<tr>
+<th>Command Line Parameter</th>
+<th>Default</th>
+<th>Description</th>
+</tr>
+</thead><tbody>
+<tr>
+<td>-password</td>
+<td></td>
+<td>The password to the PDF document.</td>
+</tr>
+<tr>
+<td>-imageType</td>
+<td>jpg</td>
+<td>The image type to write to. Currently only jpg or png.</td>
+</tr>
+<tr>
+<td>-outputPrefix</td>
+<td>Name of PDF document</td>
+<td>The prefix to the image file.</td>
+</tr>
+<tr>
+<td>-startPage</td>
+<td>1</td>
+<td>The first page to convert, one based.</td>
+</tr>
+<tr>
+<td>-endPage</td>
+<td>Integer.MAX_INT</td>
+<td>The last page to convert, one based.</td>
+</tr>
+<tr>
+<td>-nonSeq</td>
+<td>false</td>
+<td>Use the new non sequential parser.</td>
+</tr>
+</tbody></table>
+
+<h2 id="texttopdf">TextToPDF</h2>
+
+<p>This application will create a PDF document from a text file.</p>
+
+<p>usage: <code>java -jar pdfbox-app-x.y.z.jar TextToPDF [OPTIONS] &lt;outputfile&gt; &lt;textfile&gt;</code></p>
+
+<table><thead>
+<tr>
+<th>Command Line Parameter</th>
+<th>Default</th>
+<th>Description</th>
+</tr>
+</thead><tbody>
+<tr>
+<td>-standardFont</td>
+<td>Helvetica</td>
+<td>The font to use for the text. Either this or -ttf should be specified but not both.</td>
+</tr>
+<tr>
+<td>-ttf</td>
+<td></td>
+<td>The TTF font to use for the text. Either this or -standardFont should be specified but not both.</td>
+</tr>
+<tr>
+<td>-fontSize</td>
+<td>10</td>
+<td>The size of the font to use.</td>
+</tr>
+</tbody></table>
+
+<p>The following font names can be used for the parameter <code>standardFont</code>:</p>
+
+<ul>
+<li>Courier</li>
+<li>Courier-Bold</li>
+<li>Courier-Oblique</li>
+<li>Courier-BoldOblique</li>
+<li>Helvetica</li>
+<li>Helvetica-Bold</li>
+<li>Helvetica-Oblique</li>
+<li>Helvetica-BoldOblique</li>
+<li>Symbol</li>
+<li>Times-Bold</li>
+<li>Times-Roman</li>
+<li>Times-Italic</li>
+<li>Times-BoldItalic</li>
+<li>ZapfDingbats</li>
+</ul>
+
+<h2 id="writedecodeddoc">WriteDecodedDoc</h2>
+
+<p>An application to decompress PDF documents.</p>
+
+<p>usage: <code>java -jar pdfbox-app-x.y.z.jar WriteDecodedDoc &lt;input-file&gt; &lt;output-file&gt;</code></p>
+
+<table><thead>
+<tr>
+<th>Command Line Parameter</th>
+<th>Default</th>
+<th>Description</th>
+</tr>
+</thead><tbody>
+<tr>
+<td>-password</td>
+<td></td>
+<td>The password to the PDF document.</td>
+</tr>
+<tr>
+<td>-nonSeq</td>
+<td>false</td>
+<td>Use the new non sequential parser.</td>
+</tr>
+<tr>
+<td><input-file></td>
+<td></td>
+<td>The PDF file to decompress</td>
+</tr>
+<tr>
+<td><output-file></td>
+<td></td>
+<td>The destination PDF file</td>
+</tr>
+</tbody></table>
+
+            </div>
+        </div>
+    </div>
+
+    <footer class="footer">
+        <div class="container"
+            <div class="row">
+                <div class="span3">
+                    <!-- nothing in here on purpose -->
+                </div>
+                <div class="span9">
+                    <p>Copyright © 2009&ndash;2015 <a href="http://www.apache.org/">The Apache Software Foundation</a>, Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+                        <br/>Apache PDFBox, PDFBox, Apache, the Apache feather logo and the Apache PDFBox project logos are trademarks of The Apache Software Foundation.</p>
+                </div>
+            </div>
+        </div>
+    </footer>
+
+        <!-- Twitter Bootstrap and jQuery after this line. -->
+    <script src="//code.jquery.com/jquery-latest.js"></script>
+    <script src="/bootstrap/js/bootstrap.min.js"></script>
+    <script type="text/javascript">
+        
+        $(document).ready(function () {
+                $('[data-toggle="offcanvas"]').click(function () {
+                $('.row-offcanvas').toggleClass('active')
+            });
+        });
+        
+        $(function() {
+            // collapse tree nodes dynamically to support noscript
+            $('.sidebar-node').addClass('collapsed');
+            
+
+            // toggle expand/collapse
+            $('.sidebar-node > a').click(function(e) {
+                $(this).parent().toggleClass('collapsed');
+                e.preventDefault();
+            });
+
+            // preserve expand/collapse across page navigation
+            var path = document.location.pathname;
+            if (path.indexOf('/2.0') == 0) {
+                $('#v2-0').removeClass('collapsed');
+                if (path.indexOf('/2.0/cookbook') == 0) {
+                    $('#v2-0-cookbook').removeClass('collapsed');
+                }
+            } else {
+                $('#v1-8').removeClass('collapsed');
+                if (path.indexOf('/1.8/cookbook') == 0) {
+                    $('#v1-8-cookbook').removeClass('collapsed');
+                }
+            }
+
+        });
+    </script>
+
+</body>
+
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/aa929f46/content/1.8/cookbook/documentcreation.html
----------------------------------------------------------------------
diff --git a/content/1.8/cookbook/documentcreation.html b/content/1.8/cookbook/documentcreation.html
new file mode 100644
index 0000000..53d990c
--- /dev/null
+++ b/content/1.8/cookbook/documentcreation.html
@@ -0,0 +1,240 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<!--
+     
+     Licensed to the Apache Software Foundation (ASF) under one or more
+     contributor license agreements.  See the NOTICE file distributed with
+     this work for additional information regarding copyright ownership.
+     The ASF licenses this file to You under the Apache License, Version 2.0
+     (the "License"); you may not use this file except in compliance with
+     the License.  You may obtain a copy of the License at
+     
+     http://www.apache.org/licenses/LICENSE- 2.0
+     
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+     -->
+
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+    <meta name="description" content="The Apache PDFBox™ library is an open source Java tool for working with PDF documents. This project allows creation of new PDF documents, manipulation of existing documents and the ability to extract content from documents. Apache PDFBox also includes several command line utilities. Apache PDFBox is published under the Apache License v2.0.
+">
+
+    <title>Apache PDFBox | Cookbook - Document Creation</title>
+
+    <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">
+    <link href="/assets/open-iconic/font/css/open-iconic-bootstrap.min.css" rel="stylesheet">
+    <link href="/css/pygments-github.css" rel="stylesheet">
+    
+    <link href="/css/site.css" rel="stylesheet">
+    
+    
+    
+     
+    
+    
+
+</head>
+
+<body>
+    <nav class="navbar navbar-default navbar-top">
+      <div class="container">
+        <div class="navbar-header">
+          <a href="/index.html">
+            <img class="logo" src="/images/logo-head.gif">
+          </a>
+          <p class="pull-right visible-xs">
+            <button type="button" class="btn btn-primary btn-sm" data-toggle="offcanvas">Menu</button>
+          </p>
+        </div>
+      </div>
+    </nav>
+    
+    <div class="container">
+        
+        <div class="row row-offcanvas row-offcanvas-left">
+            <div class="col-xs-6 col-sm-3 sidebar-offcanvas" id="sidebar">
+                
+                <ul class="sidebar">
+                    <li class="sidebar-header">Apache PDFBox</li>
+                    <li><a href="/index.html">Overview</a></li>
+                    <li><a href="/download.cgi">Downloads</a></li>
+                    
+                    <li class="sidebar-header">Community</li>
+                    <li><a href="/support.html">Support</a></li>
+                    <li><a href="/mailinglists.html">Mailing Lists</a></li>
+                    <li><a href="/team.html">Project Team</a></li>
+                    
+                    <li class="sidebar-header">Documentation</li>
+                    <li class="sidebar-node" id="v2-0">
+                        <a href="#">2.0.0 (trunk)</a>
+                        <ul>
+                            <li><a href="/2.0/migration.html">Migration Guide</a></li>
+                            <li><a href="/2.0/getting-started.html">Getting Started</a></li>
+                            <li><a href="/2.0/examples.html">Examples</a></li>
+                            <li><a href="/2.0/dependencies.html">Dependencies</a></li>
+                            <li class="sidebar-node" id="v2-0-cookbook">
+                                <a href="#">Cookbook</a>
+                                <ul>
+                                    <li><a href="/2.0/cookbook/encryption.html">Document Encryption</a></li>
+                                </ul>
+                            </li>
+                            <li><a href="/2.0/commandline.html">Command Line Tools</a></li>
+                            <li><a href="/docs/2.0.0-SNAPSHOT/javadocs/">API Docs</a></li>
+                        </ul>
+                    </li>
+                    <li class="sidebar-node" id="v1-8">
+                        <a href="#">1.8.10</a>
+                        <ul>
+                            <li><a href="/1.8/architecture.html">Architecture</a></li>
+                            <li><a href="/1.8/dependencies.html">Dependencies</a></li>
+                            <li class="sidebar-node" id="v1-8-cookbook">
+                                <a href="#">Cookbook</a>
+                                <ul>
+                                    <li><a href="/1.8/cookbook/documentcreation.html">Document Creation</a></li>
+                                    <li><a href="/1.8/cookbook/textextraction.html">Text Extraction</a></li>
+                                    <li><a href="/1.8/cookbook/encryption.html">Document Encryption</a></li>
+                                    <li><a href="/1.8/cookbook/workingwithfonts.html">Working with Fonts</a></li>
+                                    <li><a href="/1.8/cookbook/workingwithmetadata.html">Working with Metadata</a></li>
+                                    <li><a href="/1.8/cookbook/workingwithattachments.html">Working with Attachments</a></li>
+                                    <li><a href="/1.8/cookbook/pdfavalidation.html">PDF/A Validation</a></li>
+                                    <li><a href="/1.8/cookbook/pdfacreation.html">Creating a PDF/A document</a></li>
+                                </ul>
+                            </li>
+                            <li><a href="/1.8/commandline.html">Command Line Tools</a></li>
+                            <li><a href="/docs/1.8.10/javadocs/">API Docs</a></li>
+                            <li><a href="/1.8/faq.html">FAQ</a></li>
+                        </ul>
+                    </li>
+                    
+                    <li class="sidebar-header">Development</li>
+                    <li><a href="/building.html">Building from Source</a></li>
+                    <li><a href="/codingconventions.html">Coding Conventions</a></li>
+                    <li><a href="/siteupdate.html">Update the Website</a></li>  
+                    <li><a href="https://builds.apache.org/view/All/job/PDFBox-trunk/">Jenkins</a></li>
+                    <li><a href="https://travis-ci.org/apache/pdfbox">Travis CI</a></li>
+                    <li><a href="https://analysis.apache.org/dashboard/index/org.apache.pdfbox:pdfbox-reactor">SonarQube</a></li>
+                    <li><a href="https://issues.apache.org/jira/browse/PDFBOX">JIRA</a></li>
+                    <li><a href="/ideas.html">Ideas</a></li>
+                    <li><a href="/references.html">External Links</a></li>
+
+                    <li class="sidebar-header">Apache Software Foundation</li>
+                    <li><a href="http://www.apache.org/">Apache Software Foundation</a></li>
+                    <li><a href="http://www.apache.org/foundation/thanks.html">ASF Sponsors</a></li>
+                    <li><a href="http://www.apache.org/security/">Security</a></li>
+                </ul>
+            </div>
+            <div class="col-xs-12 col-sm-9">
+                <h1 id="document-creation">Document Creation</h1>
+
+<h2 id="create-a-blank-pdf">Create a blank PDF</h2>
+
+<p>This small sample shows how to create a new PDF document using PDFBox.</p>
+<div class="highlight"><pre><code class="language-java" data-lang="java"><span class="c1">// Create a new empty document</span>
+<span class="n">PDDocument</span> <span class="n">document</span> <span class="o">=</span> <span class="k">new</span> <span class="n">PDDocument</span><span class="o">();</span>
+
+<span class="c1">// Create a new blank page and add it to the document</span>
+<span class="n">PDPage</span> <span class="n">blankPage</span> <span class="o">=</span> <span class="k">new</span> <span class="n">PDPage</span><span class="o">();</span>
+<span class="n">document</span><span class="o">.</span><span class="na">addPage</span><span class="o">(</span> <span class="n">blankPage</span> <span class="o">);</span>
+
+<span class="c1">// Save the newly created document</span>
+<span class="n">document</span><span class="o">.</span><span class="na">save</span><span class="o">(</span><span class="s">"BlankPage.pdf"</span><span class="o">);</span>
+
+<span class="c1">// finally make sure that the document is properly</span>
+<span class="c1">// closed.</span>
+<span class="n">document</span><span class="o">.</span><span class="na">close</span><span class="o">();</span>
+</code></pre></div>
+<h2 id="hello-world-using-a-pdf-base-font">Hello World using a PDF base font</h2>
+
+<p>This small sample shows how to create a new document and print the text &quot;Hello World&quot; using one of the PDF base fonts.</p>
+<div class="highlight"><pre><code class="language-java" data-lang="java"><span class="c1">// Create a document and add a page to it</span>
+<span class="n">PDDocument</span> <span class="n">document</span> <span class="o">=</span> <span class="k">new</span> <span class="n">PDDocument</span><span class="o">();</span>
+<span class="n">PDPage</span> <span class="n">page</span> <span class="o">=</span> <span class="k">new</span> <span class="n">PDPage</span><span class="o">();</span>
+<span class="n">document</span><span class="o">.</span><span class="na">addPage</span><span class="o">(</span> <span class="n">page</span> <span class="o">);</span>
+
+<span class="c1">// Create a new font object selecting one of the PDF base fonts</span>
+<span class="n">PDFont</span> <span class="n">font</span> <span class="o">=</span> <span class="n">PDType1Font</span><span class="o">.</span><span class="na">HELVETICA_BOLD</span><span class="o">;</span>
+
+<span class="c1">// Start a new content stream which will "hold" the to be created content</span>
+<span class="n">PDPageContentStream</span> <span class="n">contentStream</span> <span class="o">=</span> <span class="k">new</span> <span class="n">PDPageContentStream</span><span class="o">(</span><span class="n">document</span><span class="o">,</span> <span class="n">page</span><span class="o">);</span>
+
+<span class="c1">// Define a text content stream using the selected font, moving the cursor and drawing the text "Hello World"</span>
+<span class="n">contentStream</span><span class="o">.</span><span class="na">beginText</span><span class="o">();</span>
+<span class="n">contentStream</span><span class="o">.</span><span class="na">setFont</span><span class="o">(</span> <span class="n">font</span><span class="o">,</span> <span class="mi">12</span> <span class="o">);</span>
+<span class="n">contentStream</span><span class="o">.</span><span class="na">moveTextPositionByAmount</span><span class="o">(</span> <span class="mi">100</span><span class="o">,</span> <span class="mi">700</span> <span class="o">);</span>
+<span class="n">contentStream</span><span class="o">.</span><span class="na">drawString</span><span class="o">(</span> <span class="s">"Hello World"</span> <span class="o">);</span>
+<span class="n">contentStream</span><span class="o">.</span><span class="na">endText</span><span class="o">();</span>
+
+<span class="c1">// Make sure that the content stream is closed:</span>
+<span class="n">contentStream</span><span class="o">.</span><span class="na">close</span><span class="o">();</span>
+
+<span class="c1">// Save the results and ensure that the document is properly closed:</span>
+<span class="n">document</span><span class="o">.</span><span class="na">save</span><span class="o">(</span> <span class="s">"Hello World.pdf"</span><span class="o">);</span>
+<span class="n">document</span><span class="o">.</span><span class="na">close</span><span class="o">();</span>
+</code></pre></div>
+            </div>
+        </div>
+    </div>
+
+    <footer class="footer">
+        <div class="container"
+            <div class="row">
+                <div class="span3">
+                    <!-- nothing in here on purpose -->
+                </div>
+                <div class="span9">
+                    <p>Copyright © 2009&ndash;2015 <a href="http://www.apache.org/">The Apache Software Foundation</a>, Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+                        <br/>Apache PDFBox, PDFBox, Apache, the Apache feather logo and the Apache PDFBox project logos are trademarks of The Apache Software Foundation.</p>
+                </div>
+            </div>
+        </div>
+    </footer>
+
+        <!-- Twitter Bootstrap and jQuery after this line. -->
+    <script src="//code.jquery.com/jquery-latest.js"></script>
+    <script src="/bootstrap/js/bootstrap.min.js"></script>
+    <script type="text/javascript">
+        
+        $(document).ready(function () {
+                $('[data-toggle="offcanvas"]').click(function () {
+                $('.row-offcanvas').toggleClass('active')
+            });
+        });
+        
+        $(function() {
+            // collapse tree nodes dynamically to support noscript
+            $('.sidebar-node').addClass('collapsed');
+            
+
+            // toggle expand/collapse
+            $('.sidebar-node > a').click(function(e) {
+                $(this).parent().toggleClass('collapsed');
+                e.preventDefault();
+            });
+
+            // preserve expand/collapse across page navigation
+            var path = document.location.pathname;
+            if (path.indexOf('/2.0') == 0) {
+                $('#v2-0').removeClass('collapsed');
+                if (path.indexOf('/2.0/cookbook') == 0) {
+                    $('#v2-0-cookbook').removeClass('collapsed');
+                }
+            } else {
+                $('#v1-8').removeClass('collapsed');
+                if (path.indexOf('/1.8/cookbook') == 0) {
+                    $('#v1-8-cookbook').removeClass('collapsed');
+                }
+            }
+
+        });
+    </script>
+
+</body>
+
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/aa929f46/content/1.8/cookbook/encryption.html
----------------------------------------------------------------------
diff --git a/content/1.8/cookbook/encryption.html b/content/1.8/cookbook/encryption.html
new file mode 100644
index 0000000..34226c3
--- /dev/null
+++ b/content/1.8/cookbook/encryption.html
@@ -0,0 +1,221 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<!--
+     
+     Licensed to the Apache Software Foundation (ASF) under one or more
+     contributor license agreements.  See the NOTICE file distributed with
+     this work for additional information regarding copyright ownership.
+     The ASF licenses this file to You under the Apache License, Version 2.0
+     (the "License"); you may not use this file except in compliance with
+     the License.  You may obtain a copy of the License at
+     
+     http://www.apache.org/licenses/LICENSE- 2.0
+     
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+     -->
+
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+    <meta name="description" content="The Apache PDFBox™ library is an open source Java tool for working with PDF documents. This project allows creation of new PDF documents, manipulation of existing documents and the ability to extract content from documents. Apache PDFBox also includes several command line utilities. Apache PDFBox is published under the Apache License v2.0.
+">
+
+    <title>Apache PDFBox | Cookbook - Encrypting a file</title>
+
+    <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">
+    <link href="/assets/open-iconic/font/css/open-iconic-bootstrap.min.css" rel="stylesheet">
+    <link href="/css/pygments-github.css" rel="stylesheet">
+    
+    <link href="/css/site.css" rel="stylesheet">
+    
+    
+    
+     
+    
+    
+
+</head>
+
+<body>
+    <nav class="navbar navbar-default navbar-top">
+      <div class="container">
+        <div class="navbar-header">
+          <a href="/index.html">
+            <img class="logo" src="/images/logo-head.gif">
+          </a>
+          <p class="pull-right visible-xs">
+            <button type="button" class="btn btn-primary btn-sm" data-toggle="offcanvas">Menu</button>
+          </p>
+        </div>
+      </div>
+    </nav>
+    
+    <div class="container">
+        
+        <div class="row row-offcanvas row-offcanvas-left">
+            <div class="col-xs-6 col-sm-3 sidebar-offcanvas" id="sidebar">
+                
+                <ul class="sidebar">
+                    <li class="sidebar-header">Apache PDFBox</li>
+                    <li><a href="/index.html">Overview</a></li>
+                    <li><a href="/download.cgi">Downloads</a></li>
+                    
+                    <li class="sidebar-header">Community</li>
+                    <li><a href="/support.html">Support</a></li>
+                    <li><a href="/mailinglists.html">Mailing Lists</a></li>
+                    <li><a href="/team.html">Project Team</a></li>
+                    
+                    <li class="sidebar-header">Documentation</li>
+                    <li class="sidebar-node" id="v2-0">
+                        <a href="#">2.0.0 (trunk)</a>
+                        <ul>
+                            <li><a href="/2.0/migration.html">Migration Guide</a></li>
+                            <li><a href="/2.0/getting-started.html">Getting Started</a></li>
+                            <li><a href="/2.0/examples.html">Examples</a></li>
+                            <li><a href="/2.0/dependencies.html">Dependencies</a></li>
+                            <li class="sidebar-node" id="v2-0-cookbook">
+                                <a href="#">Cookbook</a>
+                                <ul>
+                                    <li><a href="/2.0/cookbook/encryption.html">Document Encryption</a></li>
+                                </ul>
+                            </li>
+                            <li><a href="/2.0/commandline.html">Command Line Tools</a></li>
+                            <li><a href="/docs/2.0.0-SNAPSHOT/javadocs/">API Docs</a></li>
+                        </ul>
+                    </li>
+                    <li class="sidebar-node" id="v1-8">
+                        <a href="#">1.8.10</a>
+                        <ul>
+                            <li><a href="/1.8/architecture.html">Architecture</a></li>
+                            <li><a href="/1.8/dependencies.html">Dependencies</a></li>
+                            <li class="sidebar-node" id="v1-8-cookbook">
+                                <a href="#">Cookbook</a>
+                                <ul>
+                                    <li><a href="/1.8/cookbook/documentcreation.html">Document Creation</a></li>
+                                    <li><a href="/1.8/cookbook/textextraction.html">Text Extraction</a></li>
+                                    <li><a href="/1.8/cookbook/encryption.html">Document Encryption</a></li>
+                                    <li><a href="/1.8/cookbook/workingwithfonts.html">Working with Fonts</a></li>
+                                    <li><a href="/1.8/cookbook/workingwithmetadata.html">Working with Metadata</a></li>
+                                    <li><a href="/1.8/cookbook/workingwithattachments.html">Working with Attachments</a></li>
+                                    <li><a href="/1.8/cookbook/pdfavalidation.html">PDF/A Validation</a></li>
+                                    <li><a href="/1.8/cookbook/pdfacreation.html">Creating a PDF/A document</a></li>
+                                </ul>
+                            </li>
+                            <li><a href="/1.8/commandline.html">Command Line Tools</a></li>
+                            <li><a href="/docs/1.8.10/javadocs/">API Docs</a></li>
+                            <li><a href="/1.8/faq.html">FAQ</a></li>
+                        </ul>
+                    </li>
+                    
+                    <li class="sidebar-header">Development</li>
+                    <li><a href="/building.html">Building from Source</a></li>
+                    <li><a href="/codingconventions.html">Coding Conventions</a></li>
+                    <li><a href="/siteupdate.html">Update the Website</a></li>  
+                    <li><a href="https://builds.apache.org/view/All/job/PDFBox-trunk/">Jenkins</a></li>
+                    <li><a href="https://travis-ci.org/apache/pdfbox">Travis CI</a></li>
+                    <li><a href="https://analysis.apache.org/dashboard/index/org.apache.pdfbox:pdfbox-reactor">SonarQube</a></li>
+                    <li><a href="https://issues.apache.org/jira/browse/PDFBOX">JIRA</a></li>
+                    <li><a href="/ideas.html">Ideas</a></li>
+                    <li><a href="/references.html">External Links</a></li>
+
+                    <li class="sidebar-header">Apache Software Foundation</li>
+                    <li><a href="http://www.apache.org/">Apache Software Foundation</a></li>
+                    <li><a href="http://www.apache.org/foundation/thanks.html">ASF Sponsors</a></li>
+                    <li><a href="http://www.apache.org/security/">Security</a></li>
+                </ul>
+            </div>
+            <div class="col-xs-12 col-sm-9">
+                <h1 id="encrypting-a-file">Encrypting a file</h1>
+
+<p>PDF encryption requires two passwords: the &quot;user password&quot; to open and view the file with restricted permissions, the &quot;owner password&quot; to access the file with all permission.</p>
+
+<h2 id="load-and-save-encrypted">Load and save encrypted</h2>
+
+<p>This small sample shows how to encrypt a file so that it can be viewed, but not printed..</p>
+<div class="highlight"><pre><code class="language-java" data-lang="java"><span class="n">PDDocument</span> <span class="n">doc</span> <span class="o">=</span> <span class="n">PDDocument</span><span class="o">.</span><span class="na">load</span><span class="o">(</span><span class="s">"filename.pdf"</span><span class="o">);</span>
+
+<span class="c1">// Define the length of the encryption key.</span>
+<span class="c1">// Possible values are 40 or 128 (256 will be available in PDFBox 2.0).</span>
+<span class="kt">int</span> <span class="n">keyLength</span> <span class="o">=</span> <span class="mi">128</span><span class="o">;</span>
+
+<span class="n">AccessPermission</span> <span class="n">ap</span> <span class="o">=</span> <span class="k">new</span> <span class="n">AccessPermission</span><span class="o">();</span>
+
+<span class="c1">// disable printing, everything else is allowed</span>
+<span class="n">ap</span><span class="o">.</span><span class="na">setCanPrint</span><span class="o">(</span><span class="kc">false</span><span class="o">);</span>
+
+<span class="c1">// owner password (to open the file with all permissions) is "12345"</span>
+<span class="c1">// user password (to open the file but with restricted permissions, is empty here) </span>
+<span class="n">StandardProtectionPolicy</span> <span class="n">spp</span> <span class="o">=</span> <span class="k">new</span> <span class="n">StandardProtectionPolicy</span><span class="o">(</span><span class="s">"12345"</span><span class="o">,</span> <span class="s">""</span><span class="o">,</span> <span class="n">ap</span><span class="o">);</span>
+<span class="n">spp</span><span class="o">.</span><span class="na">setEncryptionKeyLength</span><span class="o">(</span><span class="n">keyLength</span><span class="o">);</span>
+<span class="n">spp</span><span class="o">.</span><span class="na">setPermissions</span><span class="o">(</span><span class="n">ap</span><span class="o">);</span>
+<span class="n">doc</span><span class="o">.</span><span class="na">protect</span><span class="o">(</span><span class="n">spp</span><span class="o">);</span>
+
+<span class="n">doc</span><span class="o">.</span><span class="na">save</span><span class="o">(</span><span class="s">"filename-encrypted.pdf"</span><span class="o">);</span>
+<span class="n">doc</span><span class="o">.</span><span class="na">close</span><span class="o">();</span>
+</code></pre></div>
+            </div>
+        </div>
+    </div>
+
+    <footer class="footer">
+        <div class="container"
+            <div class="row">
+                <div class="span3">
+                    <!-- nothing in here on purpose -->
+                </div>
+                <div class="span9">
+                    <p>Copyright © 2009&ndash;2015 <a href="http://www.apache.org/">The Apache Software Foundation</a>, Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+                        <br/>Apache PDFBox, PDFBox, Apache, the Apache feather logo and the Apache PDFBox project logos are trademarks of The Apache Software Foundation.</p>
+                </div>
+            </div>
+        </div>
+    </footer>
+
+        <!-- Twitter Bootstrap and jQuery after this line. -->
+    <script src="//code.jquery.com/jquery-latest.js"></script>
+    <script src="/bootstrap/js/bootstrap.min.js"></script>
+    <script type="text/javascript">
+        
+        $(document).ready(function () {
+                $('[data-toggle="offcanvas"]').click(function () {
+                $('.row-offcanvas').toggleClass('active')
+            });
+        });
+        
+        $(function() {
+            // collapse tree nodes dynamically to support noscript
+            $('.sidebar-node').addClass('collapsed');
+            
+
+            // toggle expand/collapse
+            $('.sidebar-node > a').click(function(e) {
+                $(this).parent().toggleClass('collapsed');
+                e.preventDefault();
+            });
+
+            // preserve expand/collapse across page navigation
+            var path = document.location.pathname;
+            if (path.indexOf('/2.0') == 0) {
+                $('#v2-0').removeClass('collapsed');
+                if (path.indexOf('/2.0/cookbook') == 0) {
+                    $('#v2-0-cookbook').removeClass('collapsed');
+                }
+            } else {
+                $('#v1-8').removeClass('collapsed');
+                if (path.indexOf('/1.8/cookbook') == 0) {
+                    $('#v1-8-cookbook').removeClass('collapsed');
+                }
+            }
+
+        });
+    </script>
+
+</body>
+
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/aa929f46/content/1.8/cookbook/fill-form-field.html
----------------------------------------------------------------------
diff --git a/content/1.8/cookbook/fill-form-field.html b/content/1.8/cookbook/fill-form-field.html
new file mode 100644
index 0000000..20a47cc
--- /dev/null
+++ b/content/1.8/cookbook/fill-form-field.html
@@ -0,0 +1,234 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<!--
+     
+     Licensed to the Apache Software Foundation (ASF) under one or more
+     contributor license agreements.  See the NOTICE file distributed with
+     this work for additional information regarding copyright ownership.
+     The ASF licenses this file to You under the Apache License, Version 2.0
+     (the "License"); you may not use this file except in compliance with
+     the License.  You may obtain a copy of the License at
+     
+     http://www.apache.org/licenses/LICENSE- 2.0
+     
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+     -->
+
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+    <meta name="description" content="The Apache PDFBox™ library is an open source Java tool for working with PDF documents. This project allows creation of new PDF documents, manipulation of existing documents and the ability to extract content from documents. Apache PDFBox also includes several command line utilities. Apache PDFBox is published under the Apache License v2.0.
+">
+
+    <title>Apache PDFBox | Cookbook - Fill a Form Field</title>
+
+    <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">
+    <link href="/assets/open-iconic/font/css/open-iconic-bootstrap.min.css" rel="stylesheet">
+    <link href="/css/pygments-github.css" rel="stylesheet">
+    
+    <link href="/css/site.css" rel="stylesheet">
+    
+    
+    
+     
+    
+    
+
+</head>
+
+<body>
+    <nav class="navbar navbar-default navbar-top">
+      <div class="container">
+        <div class="navbar-header">
+          <a href="/index.html">
+            <img class="logo" src="/images/logo-head.gif">
+          </a>
+          <p class="pull-right visible-xs">
+            <button type="button" class="btn btn-primary btn-sm" data-toggle="offcanvas">Menu</button>
+          </p>
+        </div>
+      </div>
+    </nav>
+    
+    <div class="container">
+        
+        <div class="row row-offcanvas row-offcanvas-left">
+            <div class="col-xs-6 col-sm-3 sidebar-offcanvas" id="sidebar">
+                
+                <ul class="sidebar">
+                    <li class="sidebar-header">Apache PDFBox</li>
+                    <li><a href="/index.html">Overview</a></li>
+                    <li><a href="/download.cgi">Downloads</a></li>
+                    
+                    <li class="sidebar-header">Community</li>
+                    <li><a href="/support.html">Support</a></li>
+                    <li><a href="/mailinglists.html">Mailing Lists</a></li>
+                    <li><a href="/team.html">Project Team</a></li>
+                    
+                    <li class="sidebar-header">Documentation</li>
+                    <li class="sidebar-node" id="v2-0">
+                        <a href="#">2.0.0 (trunk)</a>
+                        <ul>
+                            <li><a href="/2.0/migration.html">Migration Guide</a></li>
+                            <li><a href="/2.0/getting-started.html">Getting Started</a></li>
+                            <li><a href="/2.0/examples.html">Examples</a></li>
+                            <li><a href="/2.0/dependencies.html">Dependencies</a></li>
+                            <li class="sidebar-node" id="v2-0-cookbook">
+                                <a href="#">Cookbook</a>
+                                <ul>
+                                    <li><a href="/2.0/cookbook/encryption.html">Document Encryption</a></li>
+                                </ul>
+                            </li>
+                            <li><a href="/2.0/commandline.html">Command Line Tools</a></li>
+                            <li><a href="/docs/2.0.0-SNAPSHOT/javadocs/">API Docs</a></li>
+                        </ul>
+                    </li>
+                    <li class="sidebar-node" id="v1-8">
+                        <a href="#">1.8.10</a>
+                        <ul>
+                            <li><a href="/1.8/architecture.html">Architecture</a></li>
+                            <li><a href="/1.8/dependencies.html">Dependencies</a></li>
+                            <li class="sidebar-node" id="v1-8-cookbook">
+                                <a href="#">Cookbook</a>
+                                <ul>
+                                    <li><a href="/1.8/cookbook/documentcreation.html">Document Creation</a></li>
+                                    <li><a href="/1.8/cookbook/textextraction.html">Text Extraction</a></li>
+                                    <li><a href="/1.8/cookbook/encryption.html">Document Encryption</a></li>
+                                    <li><a href="/1.8/cookbook/workingwithfonts.html">Working with Fonts</a></li>
+                                    <li><a href="/1.8/cookbook/workingwithmetadata.html">Working with Metadata</a></li>
+                                    <li><a href="/1.8/cookbook/workingwithattachments.html">Working with Attachments</a></li>
+                                    <li><a href="/1.8/cookbook/pdfavalidation.html">PDF/A Validation</a></li>
+                                    <li><a href="/1.8/cookbook/pdfacreation.html">Creating a PDF/A document</a></li>
+                                </ul>
+                            </li>
+                            <li><a href="/1.8/commandline.html">Command Line Tools</a></li>
+                            <li><a href="/docs/1.8.10/javadocs/">API Docs</a></li>
+                            <li><a href="/1.8/faq.html">FAQ</a></li>
+                        </ul>
+                    </li>
+                    
+                    <li class="sidebar-header">Development</li>
+                    <li><a href="/building.html">Building from Source</a></li>
+                    <li><a href="/codingconventions.html">Coding Conventions</a></li>
+                    <li><a href="/siteupdate.html">Update the Website</a></li>  
+                    <li><a href="https://builds.apache.org/view/All/job/PDFBox-trunk/">Jenkins</a></li>
+                    <li><a href="https://travis-ci.org/apache/pdfbox">Travis CI</a></li>
+                    <li><a href="https://analysis.apache.org/dashboard/index/org.apache.pdfbox:pdfbox-reactor">SonarQube</a></li>
+                    <li><a href="https://issues.apache.org/jira/browse/PDFBOX">JIRA</a></li>
+                    <li><a href="/ideas.html">Ideas</a></li>
+                    <li><a href="/references.html">External Links</a></li>
+
+                    <li class="sidebar-header">Apache Software Foundation</li>
+                    <li><a href="http://www.apache.org/">Apache Software Foundation</a></li>
+                    <li><a href="http://www.apache.org/foundation/thanks.html">ASF Sponsors</a></li>
+                    <li><a href="http://www.apache.org/security/">Security</a></li>
+                </ul>
+            </div>
+            <div class="col-xs-12 col-sm-9">
+                <h1 id="fill-a-form-field">Fill a Form Field</h1>
+
+<p>Form fields within a PDF are defined as part of the AcroForm entry within the PDF&#39;s document catalog.
+Form there individual fields can be accessed. Fields might be organized in a tree structure so it might
+be neccessary to walk through the tree to get an individual field.</p>
+
+<p>Load the PDF document.</p>
+<div class="highlight"><pre><code class="language-" data-lang="">:::java
+// load the document
+PDDocument pdfDocument = PDDocument.loadNonSeq(new File(... ), null);
+</code></pre></div>
+<p>Get the docoument catalog and the AcroForm which might be contained within.</p>
+<div class="highlight"><pre><code class="language-" data-lang="">:::java
+// get the document catalog
+PDDocumentCatalog docCatalog = pdfDocument.getDocumentCatalog();
+PDAcroForm acroForm = docCatalog.getAcroForm();
+</code></pre></div>
+<p>Retrieve an individual field and set its value.</p>
+<div class="highlight"><pre><code class="language-" data-lang="">:::java
+// as there might not be an AcroForm entry a null check is necessary
+if (acroForm != null)
+{
+    PDField field = (PDField) acroForm.getField( "fieldName" );
+    field.setValue("new field value");
+}
+</code></pre></div>
+<p>If a field is nested within the form tree a fully qualified name might be provided
+to access the field.</p>
+<div class="highlight"><pre><code class="language-" data-lang="">:::java
+// as there might not be an AcroForm entry a null check is neccessary
+if (acroForm != null)
+{
+    PDField field = (PDField) acroForm.getField( "fieldsParentName.fieldName" );
+    field.setValue("new field value");
+}
+</code></pre></div>
+<p>Save and close the filled out form.</p>
+<div class="highlight"><pre><code class="language-" data-lang="">:::java
+doc.save(filledForm);
+doc.close();
+</code></pre></div>
+            </div>
+        </div>
+    </div>
+
+    <footer class="footer">
+        <div class="container"
+            <div class="row">
+                <div class="span3">
+                    <!-- nothing in here on purpose -->
+                </div>
+                <div class="span9">
+                    <p>Copyright © 2009&ndash;2015 <a href="http://www.apache.org/">The Apache Software Foundation</a>, Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+                        <br/>Apache PDFBox, PDFBox, Apache, the Apache feather logo and the Apache PDFBox project logos are trademarks of The Apache Software Foundation.</p>
+                </div>
+            </div>
+        </div>
+    </footer>
+
+        <!-- Twitter Bootstrap and jQuery after this line. -->
+    <script src="//code.jquery.com/jquery-latest.js"></script>
+    <script src="/bootstrap/js/bootstrap.min.js"></script>
+    <script type="text/javascript">
+        
+        $(document).ready(function () {
+                $('[data-toggle="offcanvas"]').click(function () {
+                $('.row-offcanvas').toggleClass('active')
+            });
+        });
+        
+        $(function() {
+            // collapse tree nodes dynamically to support noscript
+            $('.sidebar-node').addClass('collapsed');
+            
+
+            // toggle expand/collapse
+            $('.sidebar-node > a').click(function(e) {
+                $(this).parent().toggleClass('collapsed');
+                e.preventDefault();
+            });
+
+            // preserve expand/collapse across page navigation
+            var path = document.location.pathname;
+            if (path.indexOf('/2.0') == 0) {
+                $('#v2-0').removeClass('collapsed');
+                if (path.indexOf('/2.0/cookbook') == 0) {
+                    $('#v2-0-cookbook').removeClass('collapsed');
+                }
+            } else {
+                $('#v1-8').removeClass('collapsed');
+                if (path.indexOf('/1.8/cookbook') == 0) {
+                    $('#v1-8-cookbook').removeClass('collapsed');
+                }
+            }
+
+        });
+    </script>
+
+</body>
+
+</html>
\ No newline at end of file


Mime
View raw message