pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msahy...@apache.org
Subject pdfbox-docs git commit: Site checkin for project Apache PDFBox Website
Date Fri, 17 Mar 2017 11:12:06 GMT
Repository: pdfbox-docs
Updated Branches:
  refs/heads/asf-site d9af19276 -> 567bbb74e


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/567bbb74
Tree: http://git-wip-us.apache.org/repos/asf/pdfbox-docs/tree/567bbb74
Diff: http://git-wip-us.apache.org/repos/asf/pdfbox-docs/diff/567bbb74

Branch: refs/heads/asf-site
Commit: 567bbb74e9538df6964de060cfb9f8cd22b5eb64
Parents: d9af192
Author: Maruan Sahyoun <sahyoun@fileaffairs.de>
Authored: Fri Mar 17 12:12:02 2017 +0100
Committer: Maruan Sahyoun <sahyoun@fileaffairs.de>
Committed: Fri Mar 17 12:12:02 2017 +0100

----------------------------------------------------------------------
 content/1.8/architecture.html        | 26 ++++++++--------
 content/1.8/dependencies.html        | 52 +++++++++++++++----------------
 content/1.8/faq.html                 | 46 +++++++++++++--------------
 content/2.0/cookbook/encryption.html | 42 ++++++++++++-------------
 content/2.0/dependencies.html        | 52 +++++++++++++++----------------
 content/2.0/faq.html                 | 46 +++++++++++++--------------
 content/2.0/getting-started.html     | 14 ++++-----
 content/codingconventions.html       | 44 +++++++++++++-------------
 8 files changed, 161 insertions(+), 161 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/567bbb74/content/1.8/architecture.html
----------------------------------------------------------------------
diff --git a/content/1.8/architecture.html b/content/1.8/architecture.html
index f65fcda..338d00f 100644
--- a/content/1.8/architecture.html
+++ b/content/1.8/architecture.html
@@ -247,21 +247,21 @@ doesn’t provide the functionality needed.</p>
 
 <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>
 
-<p><code class="highlighter-rouge">text
-&lt;&lt;
+<div class="highlighter-rouge"><pre class="highlight"><code>&lt;&lt;
     /Type /Page
     /MediaBox [0 0 612 915]
     /Contents 56 0 R
 &gt;&gt;
-</code></p>
+</code></pre>
+</div>
 
 <p>The information within the dictionary can be accessed using the COS model</p>
 
-<p><code class="highlighter-rouge">java
-COSDictionary page = ...;
-COSArray mediaBox = (COSArray)page.getDictionaryObject( "MediaBox" );
-System.out.println( "Width:" + mediaBox.get( 3 ) );
-</code></p>
+<div class="highlighter-rouge"><pre class="highlight"><code><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
@@ -279,11 +279,11 @@ 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>
 
-<p><code class="highlighter-rouge">java
-PDPage page = ...;
-PDRectangle mediaBox = page.getMediaBox();
-System.out.println( "Width:" + mediaBox.getWidth() );
-</code></p>
+<div class="highlighter-rouge"><pre class="highlight"><code><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

http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/567bbb74/content/1.8/dependencies.html
----------------------------------------------------------------------
diff --git a/content/1.8/dependencies.html b/content/1.8/dependencies.html
index fbc5e8b..a70f72b 100644
--- a/content/1.8/dependencies.html
+++ b/content/1.8/dependencies.html
@@ -164,13 +164,13 @@ included in the Java platform.</p>
 <p>To add the pdfbox, fontbox, jempbox and commons-logging jars to your application,
the easiest thing is to declare the Maven dependency shown below. This gives you the main
 pdfbox library directly and the other required jars as transitive dependencies.</p>
 
-<p>```xml</p>
-<dependency>
-  <groupid>org.apache.pdfbox</groupid>
-  <artifactid>pdfbox</artifactid>
-  <version>...</version>
-</dependency>
-<p>```</p>
+<div class="highlighter-rouge"><pre class="highlight"><code><span class="nt">&lt;dependency&gt;</span>
+  <span class="nt">&lt;groupId&gt;</span>org.apache.pdfbox<span class="nt">&lt;/groupId&gt;</span>
+  <span class="nt">&lt;artifactId&gt;</span>pdfbox<span class="nt">&lt;/artifactId&gt;</span>
+  <span class="nt">&lt;version&gt;</span>...<span class="nt">&lt;/version&gt;</span>
+<span class="nt">&lt;/dependency&gt;</span>
+</code></pre>
+</div>
 
 <p>Set the version field to the latest stable PDFBox version.</p>
 
@@ -193,31 +193,31 @@ pdfbox library directly and the other required jars as transitive dependencies.<
 <p>The most notable such optional feature is support for PDF encryption. Instead of
implementing its own encryption algorithms, PDFBox uses libraries from the 
 <a href="http://www.bouncycastle.org/">Legion of the Bouncy Castle</a>. Both
the bcprov and bcmail libraries are needed and can be included using the Maven dependencies
shown below.</p>
 
-<p>```xml</p>
-<dependency>
-  <groupid>org.bouncycastle</groupid>
-  <artifactid>bcprov-jdk15</artifactid>
-  <version>1.44</version>
-</dependency>
-<dependency>
-  <groupid>org.bouncycastle</groupid>
-  <artifactid>bcmail-jdk15</artifactid>
-  <version>1.44</version>
-</dependency>
-<p>```</p>
+<div class="highlighter-rouge"><pre class="highlight"><code><span class="nt">&lt;dependency&gt;</span>
+  <span class="nt">&lt;groupId&gt;</span>org.bouncycastle<span class="nt">&lt;/groupId&gt;</span>
+  <span class="nt">&lt;artifactId&gt;</span>bcprov-jdk15<span class="nt">&lt;/artifactId&gt;</span>
+  <span class="nt">&lt;version&gt;</span>1.44<span class="nt">&lt;/version&gt;</span>
+<span class="nt">&lt;/dependency&gt;</span>
+<span class="nt">&lt;dependency&gt;</span>
+  <span class="nt">&lt;groupId&gt;</span>org.bouncycastle<span class="nt">&lt;/groupId&gt;</span>
+  <span class="nt">&lt;artifactId&gt;</span>bcmail-jdk15<span class="nt">&lt;/artifactId&gt;</span>
+  <span class="nt">&lt;version&gt;</span>1.44<span class="nt">&lt;/version&gt;</span>
+<span class="nt">&lt;/dependency&gt;</span>
+</code></pre>
+</div>
 
 <h4 id="support-for-bidirectional-languages">Support for Bidirectional Languages</h4>
 <p>Another important optional feature is support for bidirectional languages like Arabic.
PDFBox uses the ICU4J library from the 
 <a href="http://site.icu-project.org/">International Components for Unicode</a>
(ICU) project to support such languages in PDF documents. To add the ICU4J jar to your project,

 use the following Maven dependency.</p>
 
-<p>```xml</p>
-<dependency>
-  <groupid>com.ibm.icu</groupid>
-  <artifactid>icu4j</artifactid>
-  <version>3.8</version>
-</dependency>
-<p>```</p>
+<div class="highlighter-rouge"><pre class="highlight"><code><span class="nt">&lt;dependency&gt;</span>
+  <span class="nt">&lt;groupId&gt;</span>com.ibm.icu<span class="nt">&lt;/groupId&gt;</span>
+  <span class="nt">&lt;artifactId&gt;</span>icu4j<span class="nt">&lt;/artifactId&gt;</span>
+  <span class="nt">&lt;version&gt;</span>3.8<span class="nt">&lt;/version&gt;</span>
+<span class="nt">&lt;/dependency&gt;</span>
+</code></pre>
+</div>
 
 <p>PDFBox also contains extra support for use with the <a href="http://lucene.apache.org/">Lucene</a>
and <a href="http://ant.apache.org/">Ant</a> projects. Since in these cases PDFBox
is just an
 add-on feature to these projects, you should first set up your application to use Lucene
or Ant and then add PDFBox support as described on this page.</p>

http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/567bbb74/content/1.8/faq.html
----------------------------------------------------------------------
diff --git a/content/1.8/faq.html b/content/1.8/faq.html
index fdfc5b0..36e8cb2 100644
--- a/content/1.8/faq.html
+++ b/content/1.8/faq.html
@@ -156,25 +156,25 @@
 <p><a name="log4j"></a>
 ### I am getting the below Log4J warning message, how do I remove it? ###</p>
 
-<p><code class="highlighter-rouge">
-log4j:WARN No appenders could be found for logger (org.apache.pdfbox.util.ResourceLoader).
+<div class="highlighter-rouge"><pre class="highlight"><code>log4j:WARN
No appenders could be found for logger (org.apache.pdfbox.util.ResourceLoader).
 log4j:WARN Please initialize the log4j system properly.
-</code></p>
+</code></pre>
+</div>
 
 <p>This message means that you need to configure the log4j logging system.
 See the <a href="http://logging.apache.org/log4j/1.2/manual.html">log4j documentation</a>
for more information.</p>
 
 <p>PDFBox comes with a sample log4j configuration file.  To use it you set a system
property like this</p>
 
-<p><code class="highlighter-rouge">
-java -Dlog4j.configuration=log4j.xml org.apache.pdfbox.ExtractText &lt;PDF-file&gt;
&lt;output-text-file&gt;
-</code></p>
+<div class="highlighter-rouge"><pre class="highlight"><code>java -Dlog4j.configuration=log4j.xml
org.apache.pdfbox.ExtractText &lt;PDF-file&gt; &lt;output-text-file&gt;
+</code></pre>
+</div>
 
 <p>If this is not working for you then you may have to specify the log4j config file
using a URL path, like this:</p>
 
-<p><code class="highlighter-rouge">
-log4j.configuration=file:///&lt;path to config file&gt;
-</code></p>
+<div class="highlighter-rouge"><pre class="highlight"><code>log4j.configuration=file:///&lt;path
to config file&gt;
+</code></pre>
+</div>
 
 <p><a name="threadsafe"></a>
 ### Is PDFBox thread safe? ###</p>
@@ -190,20 +190,20 @@ don’t then the document will not be closed properly.  Also, you must
close all
 PDDocument objects that get created.  The following code creates <strong>two</strong>
 PDDocument objects; one from the “new PDDocument()” and the second by the load method.</p>
 
-<p><code class="highlighter-rouge">java
-PDDocument doc = new PDDocument();
-try
-{
-   doc = PDDocument.load( "my.pdf" );
-}
-finally
-{
-   if( doc != null )
-   {
-      doc.close();
-   }
-}
-</code></p>
+<div class="highlighter-rouge"><pre class="highlight"><code><span class="n">PDDocument</span>
<span class="n">doc</span> <span class="o">=</span> <span class="k">new</span>
<span class="n">PDDocument</span><span class="o">();</span>
+<span class="k">try</span>
+<span class="o">{</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">"my.pdf"</span> <span class="o">);</span>
+<span class="o">}</span>
+<span class="k">finally</span>
+<span class="o">{</span>
+   <span class="k">if</span><span class="o">(</span> <span class="n">doc</span>
<span class="o">!=</span> <span class="kc">null</span> <span class="o">)</span>
+   <span class="o">{</span>
+      <span class="n">doc</span><span class="o">.</span><span
class="na">close</span><span class="o">();</span>
+   <span class="o">}</span>
+<span class="o">}</span>
+</code></pre>
+</div>
 
 <h2 id="text-extraction-1">Text Extraction</h2>
 

http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/567bbb74/content/2.0/cookbook/encryption.html
----------------------------------------------------------------------
diff --git a/content/2.0/cookbook/encryption.html b/content/2.0/cookbook/encryption.html
index 382bddb..818b817 100644
--- a/content/2.0/cookbook/encryption.html
+++ b/content/2.0/cookbook/encryption.html
@@ -139,28 +139,28 @@
 
 <p>This small sample shows how to encrypt a file so that it can be viewed, but not
printed.</p>
 
-<p>```java
-PDDocument doc = PDDocument.load(“filename.pdf”);</p>
+<div class="highlighter-rouge"><pre class="highlight"><code><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>
 
-<p>// Define the length of the encryption key.
-// Possible values are 40, 128 or 256.
-int keyLength = 256;</p>
-
-<p>AccessPermission ap = new AccessPermission();</p>
-
-<p>// disable printing, everything else is allowed
-ap.setCanPrint(false);</p>
-
-<p>// Owner password (to open the file with all permissions) is “12345”
-// User password (to open the file but with restricted permissions, is empty here) 
-StandardProtectionPolicy spp = new StandardProtectionPolicy(“12345”, “”, ap);
-spp.setEncryptionKeyLength(keyLength);
-spp.setPermissions(ap);
-doc.protect(spp);</p>
-
-<p>doc.save(“filename-encrypted.pdf”);
-doc.close();
-```</p>
+<span class="c1">// Define the length of the encryption key.</span>
+<span class="c1">// Possible values are 40, 128 or 256.</span>
+<span class="kt">int</span> <span class="n">keyLength</span> <span
class="o">=</span> <span class="mi">256</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>

http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/567bbb74/content/2.0/dependencies.html
----------------------------------------------------------------------
diff --git a/content/2.0/dependencies.html b/content/2.0/dependencies.html
index 9890ae0..d2da640 100644
--- a/content/2.0/dependencies.html
+++ b/content/2.0/dependencies.html
@@ -163,13 +163,13 @@ included in the Java platform.</p>
 <h3 id="include-dependencies-using-maven">Include Dependencies Using Maven</h3>
 <p>To add the pdfbox, fontbox, xmpbox and commons-logging jars to your application,
the easiest thing is to declare the Maven dependency shown below. This gives you the main
pdfbox library directly and the other required jars as transitive dependencies.</p>
 
-<p>```xml</p>
-<dependency>
-    <groupid>org.apache.pdfbox</groupid>
-    <artifactid>pdfbox</artifactid>
-    <version>...</version>
-</dependency>
-<p>```</p>
+<div class="highlighter-rouge"><pre class="highlight"><code><span class="nt">&lt;dependency&gt;</span>
+    <span class="nt">&lt;groupId&gt;</span>org.apache.pdfbox<span
class="nt">&lt;/groupId&gt;</span>
+    <span class="nt">&lt;artifactId&gt;</span>pdfbox<span class="nt">&lt;/artifactId&gt;</span>
+    <span class="nt">&lt;version&gt;</span>...<span class="nt">&lt;/version&gt;</span>
+<span class="nt">&lt;/dependency&gt;</span>
+</code></pre>
+</div>
 
 <p>Set the version field to the latest stable PDFBox version.</p>
 
@@ -196,25 +196,25 @@ included in the Java platform.</p>
 
 <p>Encrypting and sigining PDFs requires the <em>bcprov</em>, <em>bcmail</em>
and <em>bcpkix</em> libraries from the <a href="http://www.bouncycastle.org/">Legion
of the Bouncy Castle</a>. These can be included in your Maven project using the following
dependencies:</p>
 
-<p>```xml</p>
-<dependency>
-    <groupid>org.bouncycastle</groupid>
-    <artifactid>bcprov-jdk15on</artifactid>
-    <version>1.54</version>
-</dependency>
-
-<dependency>
-    <groupid>org.bouncycastle</groupid>
-    <artifactid>bcmail-jdk15on</artifactid>
-    <version>1.54</version>
-</dependency>
-
-<dependency>
-    <groupid>org.bouncycastle</groupid>
-    <artifactid>bcpkix-jdk15on</artifactid>
-    <version>1.54</version>
-</dependency>
-<p>```</p>
+<div class="highlighter-rouge"><pre class="highlight"><code><span class="nt">&lt;dependency&gt;</span>
+    <span class="nt">&lt;groupId&gt;</span>org.bouncycastle<span class="nt">&lt;/groupId&gt;</span>
+    <span class="nt">&lt;artifactId&gt;</span>bcprov-jdk15on<span
class="nt">&lt;/artifactId&gt;</span>
+    <span class="nt">&lt;version&gt;</span>1.54<span class="nt">&lt;/version&gt;</span>
+<span class="nt">&lt;/dependency&gt;</span>
+
+<span class="nt">&lt;dependency&gt;</span>
+    <span class="nt">&lt;groupId&gt;</span>org.bouncycastle<span class="nt">&lt;/groupId&gt;</span>
+    <span class="nt">&lt;artifactId&gt;</span>bcmail-jdk15on<span
class="nt">&lt;/artifactId&gt;</span>
+    <span class="nt">&lt;version&gt;</span>1.54<span class="nt">&lt;/version&gt;</span>
+<span class="nt">&lt;/dependency&gt;</span>
+
+<span class="nt">&lt;dependency&gt;</span>
+    <span class="nt">&lt;groupId&gt;</span>org.bouncycastle<span class="nt">&lt;/groupId&gt;</span>
+    <span class="nt">&lt;artifactId&gt;</span>bcpkix-jdk15on<span
class="nt">&lt;/artifactId&gt;</span>
+    <span class="nt">&lt;version&gt;</span>1.54<span class="nt">&lt;/version&gt;</span>
+<span class="nt">&lt;/dependency&gt;</span>
+</code></pre>
+</div>
 
 <h3 id="java-cryptography-extension-jce">Java Cryptography Extension (JCE)</h3>
 

http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/567bbb74/content/2.0/faq.html
----------------------------------------------------------------------
diff --git a/content/2.0/faq.html b/content/2.0/faq.html
index 0cc1202..3921c46 100644
--- a/content/2.0/faq.html
+++ b/content/2.0/faq.html
@@ -178,25 +178,25 @@
 
 <h3 id="i-am-getting-the-below-log4j-warning-message-how-do-i-remove-it">I am getting
the below Log4J warning message, how do I remove it?</h3>
 
-<p><code class="highlighter-rouge">
-log4j:WARN No appenders could be found for logger (org.apache.pdfbox.util.ResourceLoader).
+<div class="highlighter-rouge"><pre class="highlight"><code>log4j:WARN
No appenders could be found for logger (org.apache.pdfbox.util.ResourceLoader).
 log4j:WARN Please initialize the log4j system properly.
-</code></p>
+</code></pre>
+</div>
 
 <p>This message means that you need to configure the log4j logging system.
 See the <a href="http://logging.apache.org/log4j/1.2/manual.html">log4j documentation</a>
for more information.</p>
 
 <p>PDFBox comes with a sample log4j configuration file.  To use it you set a system
property like this</p>
 
-<p><code class="highlighter-rouge">
-java -Dlog4j.configuration=log4j.xml org.apache.pdfbox.ExtractText &lt;PDF-file&gt;
&lt;output-text-file&gt;
-</code></p>
+<div class="highlighter-rouge"><pre class="highlight"><code>java -Dlog4j.configuration=log4j.xml
org.apache.pdfbox.ExtractText &lt;PDF-file&gt; &lt;output-text-file&gt;
+</code></pre>
+</div>
 
 <p>If this is not working for you then you may have to specify the log4j config file
using a URL path, like this:</p>
 
-<p><code class="highlighter-rouge">
-log4j.configuration=file:///&lt;path to config file&gt;
-</code></p>
+<div class="highlighter-rouge"><pre class="highlight"><code>log4j.configuration=file:///&lt;path
to config file&gt;
+</code></pre>
+</div>
 
 <p><a name="threadsafe"></a></p>
 
@@ -216,20 +216,20 @@ don’t then the document will not be closed properly.  Also, you must
close all
 PDDocument objects that get created.  The following code creates <strong>two</strong>
 PDDocument objects; one from the “new PDDocument()” and the second by the load method.</p>
 
-<p><code class="highlighter-rouge">java
-PDDocument doc = new PDDocument();
-try
-{
-   doc = PDDocument.load( "my.pdf" );
-}
-finally
-{
-   if( doc != null )
-   {
-      doc.close();
-   }
-}
-</code></p>
+<div class="highlighter-rouge"><pre class="highlight"><code><span class="n">PDDocument</span>
<span class="n">doc</span> <span class="o">=</span> <span class="k">new</span>
<span class="n">PDDocument</span><span class="o">();</span>
+<span class="k">try</span>
+<span class="o">{</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">"my.pdf"</span> <span class="o">);</span>
+<span class="o">}</span>
+<span class="k">finally</span>
+<span class="o">{</span>
+   <span class="k">if</span><span class="o">(</span> <span class="n">doc</span>
<span class="o">!=</span> <span class="kc">null</span> <span class="o">)</span>
+   <span class="o">{</span>
+      <span class="n">doc</span><span class="o">.</span><span
class="na">close</span><span class="o">();</span>
+   <span class="o">}</span>
+<span class="o">}</span>
+</code></pre>
+</div>
 
 <h2 id="font-handling-1">Font Handling</h2>
 

http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/567bbb74/content/2.0/getting-started.html
----------------------------------------------------------------------
diff --git a/content/2.0/getting-started.html b/content/2.0/getting-started.html
index 7d7a3c0..e0225af 100644
--- a/content/2.0/getting-started.html
+++ b/content/2.0/getting-started.html
@@ -137,13 +137,13 @@
 
 <p>To use the latest release you’ll need to add the following dependency:</p>
 
-<p>```xml</p>
-<dependency>
-  <groupid>org.apache.pdfbox</groupid>
-  <artifactid>pdfbox</artifactid>
-  <version>2.0.4</version>
-</dependency>
-<p>```</p>
+<div class="highlighter-rouge"><pre class="highlight"><code><span class="nt">&lt;dependency&gt;</span>
+  <span class="nt">&lt;groupId&gt;</span>org.apache.pdfbox<span class="nt">&lt;/groupId&gt;</span>
+  <span class="nt">&lt;artifactId&gt;</span>pdfbox<span class="nt">&lt;/artifactId&gt;</span>
+  <span class="nt">&lt;version&gt;</span>2.0.4<span class="nt">&lt;/version&gt;</span>
+<span class="nt">&lt;/dependency&gt;</span>
+</code></pre>
+</div>
 
 <h2 id="pdfbox-and-java-8">PDFBox and Java 8</h2>
 

http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/567bbb74/content/codingconventions.html
----------------------------------------------------------------------
diff --git a/content/codingconventions.html b/content/codingconventions.html
index 0e71d3a..1ab3655 100644
--- a/content/codingconventions.html
+++ b/content/codingconventions.html
@@ -133,7 +133,7 @@
             <div class="col-xs-12 col-sm-9">
                 <h1 id="coding-conventions">Coding Conventions</h1>
 
-<p>Over the years the PDFBox project has come to adopt a number of coding conventions.
These are not always followed in old code but new code should try to follow these rules where
possible.</p>
+<p>Over the years the PDFBox project has come to adopt a number of coding conventions.
These are not always followed in old code but new code should follow these rules where possible.</p>
 
 <h3 id="formatting">Formatting</h3>
 
@@ -286,33 +286,33 @@
 
 <p>Here’s an example of PDFBox’s formatting style:</p>
 
-<p><code class="highlighter-rouge">java
-public class Foo extends Bar
-{
-    public static void main(String args[])
-    {
-        try
-        {
-            for (int i = 0; i &lt; args.length; i++)
-            {
-                System.out.println(Integer.parseInt(args[i]));
-            }
-        }
-        catch (NumberFormatException e)
-        {
-            e.printStackTrace();
-        }
-    }
-}
-</code></p>
+<div class="highlighter-rouge"><pre class="highlight"><code><span class="kd">public</span>
<span class="kd">class</span> <span class="nc">Foo</span> <span
class="kd">extends</span> <span class="n">Bar</span>
+<span class="o">{</span>
+    <span class="kd">public</span> <span class="kd">static</span>
<span class="kt">void</span> <span class="n">main</span><span class="o">(</span><span
class="n">String</span> <span class="n">args</span><span class="o">[])</span>
+    <span class="o">{</span>
+        <span class="k">try</span>
+        <span class="o">{</span>
+            <span class="k">for</span> <span class="o">(</span><span
class="kt">int</span> <span class="n">i</span> <span class="o">=</span>
<span class="mi">0</span><span class="o">;</span> <span class="n">i</span>
<span class="o">&lt;</span> <span class="n">args</span><span
class="o">.</span><span class="na">length</span><span class="o">;</span>
<span class="n">i</span><span class="o">++)</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="n">Integer</span><span class="o">.</span><span
class="na">parseInt</span><span class="o">(</span><span class="n">args</span><span
class="o">[</span><span class="n">i</span><span class="o">]));</span>
+            <span class="o">}</span>
+        <span class="o">}</span>
+        <span class="k">catch</span> <span class="o">(</span><span
class="n">NumberFormatException</span> <span class="n">e</span><span
class="o">)</span>
+        <span class="o">{</span>
+            <span class="n">e</span><span class="o">.</span><span
class="na">printStackTrace</span><span class="o">();</span>
+        <span class="o">}</span>
+    <span class="o">}</span>
+<span class="o">}</span>
+</code></pre>
+</div>
 
 <h2 id="eclipse-formatter">Eclipse Formatter</h2>
 
-<p>Eclipse users may download this preferences file: pdfbox-eclipse-formatter.xml and
import this into Eclipse. 
+<p>Eclipse users may download this preferences file: pdfbox-eclipse-formatter.xml and
import this into Eclipse.
 (Window-&gt;Preferences, go to Java-&gt;Code Style-&gt;Formatter and click “Import…”).
 Once you have done this you can reformat your code by using Source-&gt;Format (Ctrl+Shift+F).</p>
 
-<p>Also note that Eclipse will automatically format your import statements appropriately
when 
+<p>Also note that Eclipse will automatically format your import statements appropriately
when
 you invoke Source -&gt; Organize Imports (Ctrl+Shift+O).</p>
 
             </div>


Mime
View raw message