Repository: pdfbox-docs Updated Branches: refs/heads/asf-site 559848cee -> a51cb0daf
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/a51cb0da Tree: http://git-wip-us.apache.org/repos/asf/pdfbox-docs/tree/a51cb0da Diff: http://git-wip-us.apache.org/repos/asf/pdfbox-docs/diff/a51cb0da Branch: refs/heads/asf-site Commit: a51cb0daf8bef16b1e81406aff535551347d7ef8 Parents: 559848c Author: Maruan Sahyoun <[email protected]> Authored: Fri Jul 21 14:56:58 2017 +0200 Committer: Maruan Sahyoun <[email protected]> Committed: Fri Jul 21 14:56:58 2017 +0200 ---------------------------------------------------------------------- content/1.8/architecture.html | 6 ++-- content/1.8/commandline.html | 30 ++++++++--------- content/1.8/cookbook/documentcreation.html | 4 +-- content/1.8/cookbook/encryption.html | 2 +- content/1.8/cookbook/pdfacreation.html | 6 ++-- content/1.8/cookbook/pdfavalidation.html | 2 +- content/1.8/cookbook/textextraction.html | 4 +-- .../1.8/cookbook/workingwithattachments.html | 2 +- content/1.8/cookbook/workingwithfonts.html | 6 ++-- content/1.8/cookbook/workingwithmetadata.html | 4 +-- content/1.8/dependencies.html | 6 ++-- content/1.8/faq.html | 34 ++++++++++---------- content/2.0/commandline.html | 28 ++++++++-------- content/2.0/cookbook/encryption.html | 2 +- content/2.0/dependencies.html | 4 +-- content/2.0/faq.html | 2 +- content/2.0/getting-started.html | 2 +- content/2.0/migration.html | 18 +++++------ content/codingconventions.html | 4 +-- content/errors/403.html | 2 +- content/errors/404.html | 2 +- content/ideas.html | 8 ++--- content/index.html | 20 ++++++------ content/mailinglists.html | 18 +++++------ content/siteupdate.html | 2 +- 25 files changed, 107 insertions(+), 111 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/a51cb0da/content/1.8/architecture.html ---------------------------------------------------------------------- diff --git a/content/1.8/architecture.html b/content/1.8/architecture.html index 557bcbc..ee86f08 100644 --- a/content/1.8/architecture.html +++ b/content/1.8/architecture.html @@ -272,7 +272,7 @@ 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> -<div class="language-text highlighter-rouge"><pre class="highlight"><code><< +<div class="highlighter-rouge"><pre class="highlight"><code><< /Type /Page /MediaBox [0 0 612 915] /Contents 56 0 R @@ -282,7 +282,7 @@ doesnât provide the functionality needed.</p> <p>The information within the dictionary can be accessed using the COS model</p> -<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="n">COSDictionary</span> <span class="n">page</span> <span class="o">=</span> <span class="o">...;</span> +<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> @@ -304,7 +304,7 @@ 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="language-java highlighter-rouge"><pre class="highlight"><code><span class="n">PDPage</span> <span class="n">page</span> <span class="o">=</span> <span class="o">...;</span> +<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> http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/a51cb0da/content/1.8/commandline.html ---------------------------------------------------------------------- diff --git a/content/1.8/commandline.html b/content/1.8/commandline.html index e2f471c..1469dc4e 100644 --- a/content/1.8/commandline.html +++ b/content/1.8/commandline.html @@ -163,22 +163,20 @@ <p>See the <a href="/1.8/dependencies.html">Dependencies</a> 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></p> -<ul> - <li><a href="#decrypt">Decrypt</a></li> - <li><a href="#encrypt">Encrypt</a></li> - <li><a href="#extractimages">ExtractImages</a></li> - <li><a href="#extracttext">ExtractText</a></li> - <li><a href="#overlaypdf">OverlayPDF</a></li> - <li><a href="#printpdf">PrintPDF</a></li> - <li><a href="#pdfdebugger">PDFDebugger</a></li> - <li><a href="#pdfreader">PDFReader</a></li> - <li><a href="#pdfmerger">PDFMerger</a></li> - <li><a href="#pdfsplit">PDFSplit</a></li> - <li><a href="#pdftoimage">PDFToImage</a></li> - <li><a href="#texttopdf">TextToPDF</a></li> - <li><a href="#writedecodeddoc">WriteDecodedDoc</a></li> -</ul> +<p><strong>Table of Contents</strong> + - <a href="#decrypt">Decrypt</a> + - <a href="#encrypt">Encrypt</a> + - <a href="#extractimages">ExtractImages</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> http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/a51cb0da/content/1.8/cookbook/documentcreation.html ---------------------------------------------------------------------- diff --git a/content/1.8/cookbook/documentcreation.html b/content/1.8/cookbook/documentcreation.html index 49f016d..11984a6 100644 --- a/content/1.8/cookbook/documentcreation.html +++ b/content/1.8/cookbook/documentcreation.html @@ -162,7 +162,7 @@ <p>This small sample shows how to create a new PDF document using PDFBox.</p> -<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="c1">// Create a new empty document</span> +<div class="highlighter-rouge"><pre class="highlight"><code><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> @@ -182,7 +182,7 @@ <p>This small sample shows how to create a new document and print the text âHello Worldâ using one of the PDF base fonts.</p> -<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="c1">// Create a document and add a page to it</span> +<div class="highlighter-rouge"><pre class="highlight"><code><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> http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/a51cb0da/content/1.8/cookbook/encryption.html ---------------------------------------------------------------------- diff --git a/content/1.8/cookbook/encryption.html b/content/1.8/cookbook/encryption.html index 831dadc..19f33db 100644 --- a/content/1.8/cookbook/encryption.html +++ b/content/1.8/cookbook/encryption.html @@ -164,7 +164,7 @@ <p>This small sample shows how to encrypt a file so that it can be viewed, but not printed.</p> -<div class="language-java 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> +<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> <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> http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/a51cb0da/content/1.8/cookbook/pdfacreation.html ---------------------------------------------------------------------- diff --git a/content/1.8/cookbook/pdfacreation.html b/content/1.8/cookbook/pdfacreation.html index 1d6fdd9..b203f61 100644 --- a/content/1.8/cookbook/pdfacreation.html +++ b/content/1.8/cookbook/pdfacreation.html @@ -169,7 +169,7 @@ document. The current example creates a valid PDF/A-1b document.</p> <p>The PDF/A specification enforces that the fonts used in the document are present in the PDF File. You have to load them. As an example:</p> -<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="n">InputStream</span> <span class="n">fontStream</span> <span class="o">=</span> <span class="n">CreatePDFA</span><span class="o">.</span><span class="na">class</span><span class="o">.</span><span class="na">getResourceAsStream</span><span class="o">(</span><span class="s">"/org/apache/pdfbox/resources/ttf/ArialMT.ttf"</span><span class="o">);</span> +<div class="highlighter-rouge"><pre class="highlight"><code><span class="n">InputStream</span> <span class="n">fontStream</span> <span class="o">=</span> <span class="n">CreatePDFA</span><span class="o">.</span><span class="na">class</span><span class="o">.</span><span class="na">getResourceAsStream</span><span class="o">(</span><span class="s">"/org/apache/pdfbox/resources/ttf/ArialMT.ttf"</span><span class="o">);</span> <span class="n">PDFont</span> <span class="n">font</span> <span class="o">=</span> <span class="n">PDTrueTypeFont</span><span class="o">.</span><span class="na">loadTTF</span><span class="o">(</span><span class="n">doc</span><span class="o">,</span> <span class="n">fontStream</span><span class="o">);</span> </code></pre> </div> @@ -180,7 +180,7 @@ have to load them. As an example:</p> of PDF/A specification reached by the document) must be present. These lines create the XMP metadata for a PDF/A-1b document:</p> -<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="n">XMPMetadata</span> <span class="n">xmp</span> <span class="o">=</span> <span class="k">new</span> <span class="n">XMPMetadata</span><span class="o">();</span> +<div class="highlighter-rouge"><pre class="highlight"><code><span class="n">XMPMetadata</span> <span class="n">xmp</span> <span class="o">=</span> <span class="k">new</span> <span class="n">XMPMetadata</span><span class="o">();</span> <span class="n">XMPSchemaPDFAId</span> <span class="n">pdfaid</span> <span class="o">=</span> <span class="k">new</span> <span class="n">XMPSchemaPDFAId</span><span class="o">(</span><span class="n">xmp</span><span class="o">);</span> <span class="n">xmp</span><span class="o">.</span><span class="na">addSchema</span><span class="o">(</span><span class="n">pdfaid</span><span class="o">);</span> <span class="n">pdfaid</span><span class="o">.</span><span class="na">setConformance</span><span class="o">(</span><span class="s">"B"</span><span class="o">);</span> @@ -195,7 +195,7 @@ PDF/A-1b document:</p> <p>It is mandatory to include the color profile used by the document. Different profiles can be used. This example takes one present in pdfbox:</p> -<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="c1">// Create output intent</span> +<div class="highlighter-rouge"><pre class="highlight"><code><span class="c1">// Create output intent</span> <span class="n">InputStream</span> <span class="n">colorProfile</span> <span class="o">=</span> <span class="n">CreatePDFA</span><span class="o">.</span><span class="na">class</span><span class="o">.</span><span class="na">getResourceAsStream</span><span class="o">(</span><span class="s">"/org/apache/pdfbox/resources/pdfa/sRGB Color Space Profile.icm"</span><span class="o">);</span> <span class="n">PDOutputIntent</span> <span class="n">oi</span> <span class="o">=</span> <span class="k">new</span> <span class="n">PDOutputIntent</span><span class="o">(</span><span class="n">doc</span><span class="o">,</span> <span class="n">colorProfile</span><span class="o">);</span> <span class="n">oi</span><span class="o">.</span><span class="na">setInfo</span><span class="o">(</span><span class="s">"sRGB IEC61966-2.1"</span><span class="o">);</span> http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/a51cb0da/content/1.8/cookbook/pdfavalidation.html ---------------------------------------------------------------------- diff --git a/content/1.8/cookbook/pdfavalidation.html b/content/1.8/cookbook/pdfavalidation.html index 14a7fe7..bea028c 100644 --- a/content/1.8/cookbook/pdfavalidation.html +++ b/content/1.8/cookbook/pdfavalidation.html @@ -163,7 +163,7 @@ Check Compliance with PDF/A-1b</p> <p>This small sample shows how to check the compliance of a file with the PDF/A-1b specification.</p> -<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="n">ValidationResult</span> <span class="n">result</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span> +<div class="highlighter-rouge"><pre class="highlight"><code><span class="n">ValidationResult</span> <span class="n">result</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span> <span class="n">PreflightParser</span> <span class="n">parser</span> <span class="o">=</span> <span class="k">new</span> <span class="n">PreflightParser</span><span class="o">(</span><span class="n">args</span><span class="o">[</span><span class="mi">0</span><span class="o">]);</span> <span class="k">try</span> http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/a51cb0da/content/1.8/cookbook/textextraction.html ---------------------------------------------------------------------- diff --git a/content/1.8/cookbook/textextraction.html b/content/1.8/cookbook/textextraction.html index 14ac073..d4b460c 100644 --- a/content/1.8/cookbook/textextraction.html +++ b/content/1.8/cookbook/textextraction.html @@ -175,7 +175,7 @@ org.apache.pdfbox.ExtractText.</p> Lucene to be able to index a PDF document it must first be converted to text. PDFBox provides a simple approach for adding PDF documents into a Lucene index.</p> -<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="n">Document</span> <span class="n">luceneDocument</span> <span class="o">=</span> <span class="n">LucenePDFDocument</span><span class="o">.</span><span class="na">getDocument</span><span class="o">(</span> <span class="o">...</span> <span class="o">);</span> +<div class="highlighter-rouge"><pre class="highlight"><code><span class="n">Document</span> <span class="n">luceneDocument</span> <span class="o">=</span> <span class="n">LucenePDFDocument</span><span class="o">.</span><span class="na">getDocument</span><span class="o">(</span> <span class="o">...</span> <span class="o">);</span> </code></pre> </div> @@ -200,7 +200,7 @@ process. The simplest is to specify the range of pages that you want to be extra For example, to only extract text from the second and third pages of the PDF document you could do this:</p> -<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="n">PDFTextStripper</span> <span class="n">stripper</span> <span class="o">=</span> <span class="k">new</span> <span class="n">PDFTextStripper</span><span class="o">();</span> +<div class="highlighter-rouge"><pre class="highlight"><code><span class="n">PDFTextStripper</span> <span class="n">stripper</span> <span class="o">=</span> <span class="k">new</span> <span class="n">PDFTextStripper</span><span class="o">();</span> <span class="n">stripper</span><span class="o">.</span><span class="na">setStartPage</span><span class="o">(</span> <span class="mi">2</span> <span class="o">);</span> <span class="n">stripper</span><span class="o">.</span><span class="na">setEndPage</span><span class="o">(</span> <span class="mi">3</span> <span class="o">);</span> <span class="n">stripper</span><span class="o">.</span><span class="na">writeText</span><span class="o">(</span> <span class="o">...</span> <span class="o">);</span> http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/a51cb0da/content/1.8/cookbook/workingwithattachments.html ---------------------------------------------------------------------- diff --git a/content/1.8/cookbook/workingwithattachments.html b/content/1.8/cookbook/workingwithattachments.html index b57bb08..df6021e 100644 --- a/content/1.8/cookbook/workingwithattachments.html +++ b/content/1.8/cookbook/workingwithattachments.html @@ -182,7 +182,7 @@ attribute of the <code class="highlighter-rouge">PDComplexFileSpecification</cod menu. PDFBox allows attachments to be added to and extracted from PDF documents. Attachments are part of the named tree that is attached to the document catalog.</p> -<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="n">PDEmbeddedFilesNameTreeNode</span> <span class="n">efTree</span> <span class="o">=</span> <span class="k">new</span> <span class="n">PDEmbeddedFilesNameTreeNode</span><span class="o">();</span> +<div class="highlighter-rouge"><pre class="highlight"><code><span class="n">PDEmbeddedFilesNameTreeNode</span> <span class="n">efTree</span> <span class="o">=</span> <span class="k">new</span> <span class="n">PDEmbeddedFilesNameTreeNode</span><span class="o">();</span> <span class="c1">//first create the file specification, which holds the embedded file</span> <span class="n">PDComplexFileSpecification</span> <span class="n">fs</span> <span class="o">=</span> <span class="k">new</span> <span class="n">PDComplexFileSpecification</span><span class="o">();</span> http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/a51cb0da/content/1.8/cookbook/workingwithfonts.html ---------------------------------------------------------------------- diff --git a/content/1.8/cookbook/workingwithfonts.html b/content/1.8/cookbook/workingwithfonts.html index 615e76e..ffa1694 100644 --- a/content/1.8/cookbook/workingwithfonts.html +++ b/content/1.8/cookbook/workingwithfonts.html @@ -233,7 +233,7 @@ <p>This small sample shows how to create a new document and print the text âHello Worldâ using one of the PDF base fonts.</p> -<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="c1">// Create a document and add a page to it</span> +<div class="highlighter-rouge"><pre class="highlight"><code><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> @@ -264,7 +264,7 @@ <p>This small sample shows how to create a new document and print the text âHello Worldâ using a TrueType font.</p> -<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="c1">// Create a document and add a page to it</span> +<div class="highlighter-rouge"><pre class="highlight"><code><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> @@ -303,7 +303,7 @@ use when no mapping exists.</p> <p>This small sample shows how to create a new document and print the text âHello Worldâ using a PostScript Type1 font.</p> -<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="c1">// Create a document and add a page to it</span> +<div class="highlighter-rouge"><pre class="highlight"><code><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> http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/a51cb0da/content/1.8/cookbook/workingwithmetadata.html ---------------------------------------------------------------------- diff --git a/content/1.8/cookbook/workingwithmetadata.html b/content/1.8/cookbook/workingwithmetadata.html index 5699d12..54ed6b6 100644 --- a/content/1.8/cookbook/workingwithmetadata.html +++ b/content/1.8/cookbook/workingwithmetadata.html @@ -170,7 +170,7 @@ Getting basic Metadata</p> <p>To set or retrieve basic information about the document the PDDocumentInformation object provides a high level API to that information:</p> -<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="n">PDDocumentInformation</span> <span class="n">info</span> <span class="o">=</span> <span class="n">document</span><span class="o">.</span><span class="na">getDocumentInformation</span><span class="o">();</span> +<div class="highlighter-rouge"><pre class="highlight"><code><span class="n">PDDocumentInformation</span> <span class="n">info</span> <span class="o">=</span> <span class="n">document</span><span class="o">.</span><span class="na">getDocumentInformation</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">"Page Count="</span> <span class="o">+</span> <span class="n">document</span><span class="o">.</span><span class="na">getNumberOfPages</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="s">"Title="</span> <span class="o">+</span> <span class="n">info</span><span class="o">.</span><span class="na">getTitle</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="s">"Author="</span> <span class="o">+</span> <span class="n">info</span><span class="o">.</span><span class="na">getAuthor</span><span class="o">()</span> <span class="o">);</span> @@ -206,7 +206,7 @@ recommended that you review that specification. Currently there is no high level managing the XML metadata, PDFBox uses standard java InputStream/OutputStream to retrieve or set the XML metadata.</p> -<div class="language-java 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="o">...</span> <span class="o">);</span> +<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="o">...</span> <span class="o">);</span> <span class="n">PDDocumentCatalog</span> <span class="n">catalog</span> <span class="o">=</span> <span class="n">doc</span><span class="o">.</span><span class="na">getDocumentCatalog</span><span class="o">();</span> <span class="n">PDMetadata</span> <span class="n">metadata</span> <span class="o">=</span> <span class="n">catalog</span><span class="o">.</span><span class="na">getMetadata</span><span class="o">();</span> http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/a51cb0da/content/1.8/dependencies.html ---------------------------------------------------------------------- diff --git a/content/1.8/dependencies.html b/content/1.8/dependencies.html index 832342b..2dc24c5 100644 --- a/content/1.8/dependencies.html +++ b/content/1.8/dependencies.html @@ -189,7 +189,7 @@ 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> -<div class="language-xml highlighter-rouge"><pre class="highlight"><code><span class="nt"><dependency></span> +<div class="highlighter-rouge"><pre class="highlight"><code><span class="nt"><dependency></span> <span class="nt"><groupId></span>org.apache.pdfbox<span class="nt"></groupId></span> <span class="nt"><artifactId></span>pdfbox<span class="nt"></artifactId></span> <span class="nt"><version></span>...<span class="nt"></version></span> @@ -218,7 +218,7 @@ 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> -<div class="language-xml highlighter-rouge"><pre class="highlight"><code><span class="nt"><dependency></span> +<div class="highlighter-rouge"><pre class="highlight"><code><span class="nt"><dependency></span> <span class="nt"><groupId></span>org.bouncycastle<span class="nt"></groupId></span> <span class="nt"><artifactId></span>bcprov-jdk15<span class="nt"></artifactId></span> <span class="nt"><version></span>1.44<span class="nt"></version></span> @@ -236,7 +236,7 @@ pdfbox library directly and the other required jars as transitive dependencies.< <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> -<div class="language-xml highlighter-rouge"><pre class="highlight"><code><span class="nt"><dependency></span> +<div class="highlighter-rouge"><pre class="highlight"><code><span class="nt"><dependency></span> <span class="nt"><groupId></span>com.ibm.icu<span class="nt"></groupId></span> <span class="nt"><artifactId></span>icu4j<span class="nt"></artifactId></span> <span class="nt"><version></span>3.8<span class="nt"></version></span> http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/a51cb0da/content/1.8/faq.html ---------------------------------------------------------------------- diff --git a/content/1.8/faq.html b/content/1.8/faq.html index 36c8563..1e65d10 100644 --- a/content/1.8/faq.html +++ b/content/1.8/faq.html @@ -178,8 +178,8 @@ <h2 id="general-questions-1">General Questions</h2> -<p><a name="log4j"></a></p> -<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><a name="log4j"></a> +### I am getting the below Log4J warning message, how do I remove it? ###</p> <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. @@ -201,21 +201,21 @@ See the <a href="http://logging.apache.org/log4j/1.2/manual.html">log4j document </code></pre> </div> -<p><a name="threadsafe"></a></p> -<h3 id="is-pdfbox-thread-safe">Is PDFBox thread safe?</h3> +<p><a name="threadsafe"></a> +### Is PDFBox thread safe? ###</p> <p>No! Only one thread may access a single document at a time. You can have multiple threads each accessing their own PDDocument object.</p> -<p><a name="notclosed"></a></p> -<h3 id="why-do-i-get-a-warning-you-did-not-close-the-pdf-document">Why do I get a âWarning: You did not close the PDF Documentâ?</h3> +<p><a name="notclosed"></a> +### Why do I get a âWarning: You did not close the PDF Documentâ? ###</p> <p>You need to call close() on the PDDocument inside the finally block, if you 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> -<div class="language-java 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> +<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> @@ -232,8 +232,8 @@ PDDocument objects; one from the ânew PDDocument()â and the second by the lo <h2 id="text-extraction-1">Text Extraction</h2> -<p><a name="notext"></a></p> -<h3 id="how-come-i-am-not-getting-any-text-from-the-pdf-document">How come I am not getting any text from the PDF document?</h3> +<p><a name="notext"></a> +### How come I am not getting any text from the PDF document? ###</p> <p>Text extraction from a pdf document is a complicated task and there are many factors involved that effect the possibility and accuracy of text extraction. It would be helpful @@ -246,8 +246,8 @@ should be able to as well and it is a bug if it cannot. If Acrobat cannot extra You can tell by using the selection tool in Acrobat, if you canât select any text then it is probably an image.</li> </ul> -<p><a name="gibberish"></a></p> -<h3 id="how-come-i-am-getting-gibberishg38g43g36g51g5-when-extracting-text">How come I am getting gibberish(G38G43G36G51G5) when extracting text?</h3> +<p><a name="gibberish"></a> +### How come I am getting gibberish(G38G43G36G51G5) when extracting text? ###</p> <p>This is because the characters in a PDF document can use a custom encoding instead of unicode or ASCII. When you see gibberish text then it @@ -255,23 +255,23 @@ probably means that a meaningless internal encoding is being used. The only way to access the text is to use OCR. This may be a future enhancement.</p> -<p><a name="fontwidth"></a></p> -<h3 id="what-does-javaioioexception-cant-handle-font-width-mean">What does âjava.io.IOException: Canât handle font widthâ mean?</h3> +<p><a name="fontwidth"></a> +### What does âjava.io.IOException: Canât handle font widthâ mean? ###</p> <p>This probably means that the âResourcesâ directory is not in your classpath. The Resources directory is included in the PDFBox jar so this is only a problem if you are building PDFBox yourself and not using the binary.</p> -<p><a name="permission"></a></p> -<h3 id="why-do-i-get-you-do-not-have-permission-to-extract-text-on-some-documents">Why do I get âYou do not have permission to extract textâ on some documents?</h3> +<p><a name="permission"></a> +### Why do I get âYou do not have permission to extract textâ on some documents? ###</p> <p>PDF documents have certain security permissions that can be applied to them and two passwords associated with them, a user password and a master password. If the âcannot extract textâ permission bit is set then you need to decrypt the document with the master password in order to extract the text.</p> -<p><a name="partially"></a></p> -<h3 id="cant-we-just-extract-the-text-without-parsing-the-whole-document-or-extract-text-as-it-is-parsed">Canât we just extract the text without parsing the whole document or extract text as it is parsed?</h3> +<p><a name="partially"></a> +### Canât we just extract the text without parsing the whole document or extract text as it is parsed? ###</p> <p>Not really, for a couple reasons.</p> http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/a51cb0da/content/2.0/commandline.html ---------------------------------------------------------------------- diff --git a/content/2.0/commandline.html b/content/2.0/commandline.html index ed2d5c4..0425a7e 100644 --- a/content/2.0/commandline.html +++ b/content/2.0/commandline.html @@ -163,21 +163,19 @@ <p>See the <a href="/2.0/dependencies.html">Dependencies</a> 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></p> -<ul> - <li><a href="#decrypt">Decrypt</a></li> - <li><a href="#encrypt">Encrypt</a></li> - <li><a href="#extractimages">ExtractImages</a></li> - <li><a href="#extracttext">ExtractText</a></li> - <li><a href="#overlaypdf">OverlayPDF</a></li> - <li><a href="#pdfdebugger">PDFDebugger</a></li> - <li><a href="#pdfmerger">PDFMerger</a></li> - <li><a href="#pdfsplit">PDFSplit</a></li> - <li><a href="#pdftoimage">PDFToImage</a></li> - <li><a href="#printpdf">PrintPDF</a></li> - <li><a href="#texttopdf">TextToPDF</a></li> - <li><a href="#writedecodeddoc">WriteDecodedDoc</a></li> -</ul> +<p><strong>Table of Contents</strong> + - <a href="#decrypt">Decrypt</a> + - <a href="#encrypt">Encrypt</a> + - <a href="#extractimages">ExtractImages</a> + - <a href="#extracttext">ExtractText</a> + - <a href="#overlaypdf">OverlayPDF</a> + - <a href="#pdfdebugger">PDFDebugger</a> + - <a href="#pdfmerger">PDFMerger</a> + - <a href="#pdfsplit">PDFSplit</a> + - <a href="#pdftoimage">PDFToImage</a> + - <a href="#printpdf">PrintPDF</a> + - <a href="#texttopdf">TextToPDF</a> + - <a href="#writedecodeddoc">WriteDecodedDoc</a></p> <h2 id="decrypt">Decrypt</h2> http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/a51cb0da/content/2.0/cookbook/encryption.html ---------------------------------------------------------------------- diff --git a/content/2.0/cookbook/encryption.html b/content/2.0/cookbook/encryption.html index 6b9e0c3..49ee086 100644 --- a/content/2.0/cookbook/encryption.html +++ b/content/2.0/cookbook/encryption.html @@ -164,7 +164,7 @@ <p>This small sample shows how to encrypt a file so that it can be viewed, but not printed.</p> -<div class="language-java 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> +<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> <span class="c1">// Define the length of the encryption key.</span> <span class="c1">// Possible values are 40, 128 or 256.</span> http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/a51cb0da/content/2.0/dependencies.html ---------------------------------------------------------------------- diff --git a/content/2.0/dependencies.html b/content/2.0/dependencies.html index 6c8eb54..3b8287e 100644 --- a/content/2.0/dependencies.html +++ b/content/2.0/dependencies.html @@ -188,7 +188,7 @@ 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> -<div class="language-xml highlighter-rouge"><pre class="highlight"><code><span class="nt"><dependency></span> +<div class="highlighter-rouge"><pre class="highlight"><code><span class="nt"><dependency></span> <span class="nt"><groupId></span>org.apache.pdfbox<span class="nt"></groupId></span> <span class="nt"><artifactId></span>pdfbox<span class="nt"></artifactId></span> <span class="nt"><version></span>...<span class="nt"></version></span> @@ -224,7 +224,7 @@ There is a know issue when using the JBIG2-Image-Decoder as an ImageIO Plugin. T <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> -<div class="language-xml highlighter-rouge"><pre class="highlight"><code><span class="nt"><dependency></span> +<div class="highlighter-rouge"><pre class="highlight"><code><span class="nt"><dependency></span> <span class="nt"><groupId></span>org.bouncycastle<span class="nt"></groupId></span> <span class="nt"><artifactId></span>bcprov-jdk15on<span class="nt"></artifactId></span> <span class="nt"><version></span>1.54<span class="nt"></version></span> http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/a51cb0da/content/2.0/faq.html ---------------------------------------------------------------------- diff --git a/content/2.0/faq.html b/content/2.0/faq.html index e81a0cb..dd9a962 100644 --- a/content/2.0/faq.html +++ b/content/2.0/faq.html @@ -241,7 +241,7 @@ 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> -<div class="language-java 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> +<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> http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/a51cb0da/content/2.0/getting-started.html ---------------------------------------------------------------------- diff --git a/content/2.0/getting-started.html b/content/2.0/getting-started.html index 036be06..067dda2 100644 --- a/content/2.0/getting-started.html +++ b/content/2.0/getting-started.html @@ -162,7 +162,7 @@ <p>To use the latest release youâll need to add the following dependency:</p> -<div class="language-xml highlighter-rouge"><pre class="highlight"><code><span class="nt"><dependency></span> +<div class="highlighter-rouge"><pre class="highlight"><code><span class="nt"><dependency></span> <span class="nt"><groupId></span>org.apache.pdfbox<span class="nt"></groupId></span> <span class="nt"><artifactId></span>pdfbox<span class="nt"></artifactId></span> <span class="nt"><version></span>2.0.4<span class="nt"></version></span> http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/a51cb0da/content/2.0/migration.html ---------------------------------------------------------------------- diff --git a/content/2.0/migration.html b/content/2.0/migration.html index 9e0233c..c43d972 100644 --- a/content/2.0/migration.html +++ b/content/2.0/migration.html @@ -222,7 +222,7 @@ results when switching to PDFBox 2.0.0.</p> <p>TrueType fonts shall now be loaded using</p> -<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="n">PDType0Font</span><span class="o">.</span><span class="na">load</span> +<div class="highlighter-rouge"><pre class="highlight"><code><span class="n">PDType0Font</span><span class="o">.</span><span class="na">load</span> </code></pre> </div> @@ -254,7 +254,7 @@ and so on. The <code class="highlighter-rouge">add</code> method now supports al <p>Prior to PDFBox 2.0 parsing the page content was done using</p> -<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="n">PDStream</span> <span class="n">contents</span> <span class="o">=</span> <span class="n">page</span><span class="o">.</span><span class="na">getContents</span><span class="o">();</span> +<div class="highlighter-rouge"><pre class="highlight"><code><span class="n">PDStream</span> <span class="n">contents</span> <span class="o">=</span> <span class="n">page</span><span class="o">.</span><span class="na">getContents</span><span class="o">();</span> <span class="n">PDFStreamParser</span> <span class="n">parser</span> <span class="o">=</span> <span class="k">new</span> <span class="n">PDFStreamParser</span><span class="o">(</span><span class="n">contents</span><span class="o">.</span><span class="na">getStream</span><span class="o">());</span> <span class="n">parser</span><span class="o">.</span><span class="na">parse</span><span class="o">();</span> <span class="n">List</span><span class="o"><</span><span class="n">Object</span><span class="o">></span> <span class="n">tokens</span> <span class="o">=</span> <span class="n">parser</span><span class="o">.</span><span class="na">getTokens</span><span class="o">();</span> @@ -263,7 +263,7 @@ and so on. The <code class="highlighter-rouge">add</code> method now supports al <p>With PDFBox 2.0 the code is reduced to</p> -<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="n">PDFStreamParser</span> <span class="n">parser</span> <span class="o">=</span> <span class="k">new</span> <span class="n">PDFStreamParser</span><span class="o">(</span><span class="n">page</span><span class="o">);</span> +<div class="highlighter-rouge"><pre class="highlight"><code><span class="n">PDFStreamParser</span> <span class="n">parser</span> <span class="o">=</span> <span class="k">new</span> <span class="n">PDFStreamParser</span><span class="o">(</span><span class="n">page</span><span class="o">);</span> <span class="n">parser</span><span class="o">.</span><span class="na">parse</span><span class="o">();</span> <span class="n">List</span><span class="o"><</span><span class="n">Object</span><span class="o">></span> <span class="n">tokens</span> <span class="o">=</span> <span class="n">parser</span><span class="o">.</span><span class="na">getTokens</span><span class="o">();</span> </code></pre> @@ -274,7 +274,7 @@ and so on. The <code class="highlighter-rouge">add</code> method now supports al <h3 id="iterating-pages">Iterating Pages</h3> <p>With PDFBox 2.0.0 the prefered way to iterate through the pages of a document is</p> -<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="k">for</span><span class="o">(</span><span class="n">PDPage</span> <span class="n">page</span> <span class="o">:</span> <span class="n">document</span><span class="o">.</span><span class="na">getPages</span><span class="o">())</span> +<div class="highlighter-rouge"><pre class="highlight"><code><span class="k">for</span><span class="o">(</span><span class="n">PDPage</span> <span class="n">page</span> <span class="o">:</span> <span class="n">document</span><span class="o">.</span><span class="na">getPages</span><span class="o">())</span> <span class="o">{</span> <span class="o">...</span> <span class="o">(</span><span class="k">do</span> <span class="n">something</span><span class="o">)</span> <span class="o">}</span> @@ -284,7 +284,7 @@ and so on. The <code class="highlighter-rouge">add</code> method now supports al <h3 id="pdf-rendering">PDF Rendering</h3> <p>With PDFBox 2.0.0 <code class="highlighter-rouge">PDPage.convertToImage</code> and <code class="highlighter-rouge">PDFImageWriter</code> have been removed. Instead the new <code class="highlighter-rouge">PDFRenderer</code> class shall be used.</p> -<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="n">PDDocument</span> <span class="n">document</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="k">new</span> <span class="n">File</span><span class="o">(</span><span class="n">pdfFilename</span><span class="o">));</span> +<div class="highlighter-rouge"><pre class="highlight"><code><span class="n">PDDocument</span> <span class="n">document</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="k">new</span> <span class="n">File</span><span class="o">(</span><span class="n">pdfFilename</span><span class="o">));</span> <span class="n">PDFRenderer</span> <span class="n">pdfRenderer</span> <span class="o">=</span> <span class="k">new</span> <span class="n">PDFRenderer</span><span class="o">(</span><span class="n">document</span><span class="o">);</span> <span class="kt">int</span> <span class="n">pageCounter</span> <span class="o">=</span> <span class="mi">0</span><span class="o">;</span> <span class="k">for</span> <span class="o">(</span><span class="n">PDPage</span> <span class="n">page</span> <span class="o">:</span> <span class="n">document</span><span class="o">.</span><span class="na">getPages</span><span class="o">())</span> @@ -328,7 +328,7 @@ https://bugs.openjdk.java.net/browse/JDK-8041125</p> <p>Users of <code class="highlighter-rouge">PDFPrinter.silentPrint()</code> should now use this code:</p> -<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="n">PrinterJob</span> <span class="n">job</span> <span class="o">=</span> <span class="n">PrinterJob</span><span class="o">.</span><span class="na">getPrinterJob</span><span class="o">();</span> +<div class="highlighter-rouge"><pre class="highlight"><code><span class="n">PrinterJob</span> <span class="n">job</span> <span class="o">=</span> <span class="n">PrinterJob</span><span class="o">.</span><span class="na">getPrinterJob</span><span class="o">();</span> <span class="n">job</span><span class="o">.</span><span class="na">setPageable</span><span class="o">(</span><span class="k">new</span> <span class="n">PDFPageable</span><span class="o">(</span><span class="n">document</span><span class="o">));</span> <span class="n">job</span><span class="o">.</span><span class="na">print</span><span class="o">();</span> </code></pre> @@ -336,7 +336,7 @@ https://bugs.openjdk.java.net/browse/JDK-8041125</p> <p>While users of <code class="highlighter-rouge">PDFPrinter.print()</code> should now use this code:</p> -<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="n">PrinterJob</span> <span class="n">job</span> <span class="o">=</span> <span class="n">PrinterJob</span><span class="o">.</span><span class="na">getPrinterJob</span><span class="o">();</span> +<div class="highlighter-rouge"><pre class="highlight"><code><span class="n">PrinterJob</span> <span class="n">job</span> <span class="o">=</span> <span class="n">PrinterJob</span><span class="o">.</span><span class="na">getPrinterJob</span><span class="o">();</span> <span class="n">job</span><span class="o">.</span><span class="na">setPageable</span><span class="o">(</span><span class="k">new</span> <span class="n">PDFPageable</span><span class="o">(</span><span class="n">document</span><span class="o">));</span> <span class="k">if</span> <span class="o">(</span><span class="n">job</span><span class="o">.</span><span class="na">printDialog</span><span class="o">())</span> <span class="o">{</span> <span class="n">job</span><span class="o">.</span><span class="na">print</span><span class="o">();</span> @@ -350,7 +350,7 @@ https://bugs.openjdk.java.net/browse/JDK-8041125</p> <p>In 1.8, to get the text colors, one method was to pass an expanded .properties file to the PDFStripper constructor. To achieve the same in PDFBox 2.0 you can extend <code class="highlighter-rouge">PDFTextStripper</code>and add the following <code class="highlighter-rouge">Operators</code> to the constructor:</p> -<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="n">addOperator</span><span class="o">(</span><span class="k">new</span> <span class="n">SetStrokingColorSpace</span><span class="o">());</span> +<div class="highlighter-rouge"><pre class="highlight"><code><span class="n">addOperator</span><span class="o">(</span><span class="k">new</span> <span class="n">SetStrokingColorSpace</span><span class="o">());</span> <span class="n">addOperator</span><span class="o">(</span><span class="k">new</span> <span class="n">SetNonStrokingColorSpace</span><span class="o">());</span> <span class="n">addOperator</span><span class="o">(</span><span class="k">new</span> <span class="n">SetStrokingDeviceCMYKColor</span><span class="o">());</span> <span class="n">addOperator</span><span class="o">(</span><span class="k">new</span> <span class="n">SetNonStrokingDeviceCMYKColor</span><span class="o">());</span> @@ -372,7 +372,7 @@ tree are now represented by the <code class="highlighter-rouge">PDNonTerminalFie <p>With PDFBox 2.0.0 the prefered way to iterate through the fields is now</p> -<div class="language-java highlighter-rouge"><pre class="highlight"><code><span class="n">PDAcroForm</span> <span class="n">form</span><span class="o">;</span> +<div class="highlighter-rouge"><pre class="highlight"><code><span class="n">PDAcroForm</span> <span class="n">form</span><span class="o">;</span> <span class="o">...</span> <span class="k">for</span> <span class="o">(</span><span class="n">PDField</span> <span class="n">field</span> <span class="o">:</span> <span class="n">form</span><span class="o">.</span><span class="na">getFieldTree</span><span class="o">())</span> <span class="o">{</span> http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/a51cb0da/content/codingconventions.html ---------------------------------------------------------------------- diff --git a/content/codingconventions.html b/content/codingconventions.html index d63409c..df974cd 100644 --- a/content/codingconventions.html +++ b/content/codingconventions.html @@ -311,9 +311,9 @@ <p>Hereâs an example of PDFBoxâs formatting style:</p> -<div class="language-java 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> +<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="nf">main</span><span class="o">(</span><span class="n">String</span> <span class="n">args</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> http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/a51cb0da/content/errors/403.html ---------------------------------------------------------------------- diff --git a/content/errors/403.html b/content/errors/403.html index 7d39eb0..38b26d2 100644 --- a/content/errors/403.html +++ b/content/errors/403.html @@ -156,7 +156,7 @@ width="135" height="265"></iframe> </div> <div class="col-xs-12 col-sm-9"> - <h1 id="403">403</h1> + <h1 id="section">403</h1> <p>Weâre sorry, but the page you requested cannot be accessed.</p> http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/a51cb0da/content/errors/404.html ---------------------------------------------------------------------- diff --git a/content/errors/404.html b/content/errors/404.html index 35b1b21..b277910 100644 --- a/content/errors/404.html +++ b/content/errors/404.html @@ -156,7 +156,7 @@ width="135" height="265"></iframe> </div> <div class="col-xs-12 col-sm-9"> - <h1 id="404">404</h1> + <h1 id="section">404</h1> <p>Weâre sorry, but the page you requested cannot be found.</p> http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/a51cb0da/content/ideas.html ---------------------------------------------------------------------- diff --git a/content/ideas.html b/content/ideas.html index a0df41d..c000ab0 100644 --- a/content/ideas.html +++ b/content/ideas.html @@ -175,18 +175,18 @@ implementation.</p> <p>In addition to the PDF parsing pdfbox does not always handle large PDF files well as some of the references are implemented as int instead of long</p> -<h2 id="switch-to-java-16"><span class="complete">Switch to Java 1.6</span></h2> +<h2 id="span-classcompleteswitch-to-java-16span"><span class="complete">Switch to Java 1.6</span></h2> <p><span class="complete">PDFBox 2.0.0 has Java 6 as a minimum requirement.</span></p> -<h2 id="break-pdfbox-into-modules"><span class="complete">Break PDFBox into modules</span></h2> +<h2 id="span-classcompletebreak-pdfbox-into-modulesspan"><span class="complete">Break PDFBox into modules</span></h2> <p><span class="complete">In order to support different use cases and provide a minimal toolset PDFBox 2.0.0 should be separated into different modules. This goes inline with rearranging some of the code e.g. remove AWT from PDDocument. </span></p> -<h2 id="enhance-the-font-rendering"><span class="complete">Enhance the font rendering</span></h2> +<h2 id="span-classcompleteenhance-the-font-renderingspan"><span class="complete">Enhance the font rendering</span></h2> <p><span class="complete">PDFBox 2.0.0 will render most of the fonts without using AWT.</span></p> @@ -208,7 +208,7 @@ enhanced that situation but there is a need to have a cleaner foundation broken <p>In addition, handling documents which are not conforming shouldnât be part of the core parser but of an extensible approach, e.g. by adding hooks to allow for handling parsing exceptions.</p> -<h2 id="add-the-ability-to-create-pdfs-using-unicode-encoded-text"><span class="complete">Add the ability to create PDFs using unicode encoded text</span></h2> +<h2 id="span-classcompleteadd-the-ability-to-create-pdfs-using-unicode-encoded-textspan"><span class="complete">Add the ability to create PDFs using unicode encoded text</span></h2> <p><span class="complete">The recent PDFBox version is limited to WinANSI encoded text. 2.0.0 should have unicode support as well.</span></p> http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/a51cb0da/content/index.html ---------------------------------------------------------------------- diff --git a/content/index.html b/content/index.html index b2442b1..f202841 100644 --- a/content/index.html +++ b/content/index.html @@ -156,7 +156,7 @@ width="135" height="265"></iframe> </div> <div class="col-xs-12 col-sm-9"> - <h1 id="apache-pdfbox---a-java-pdf-library">Apache PDFBox<sup>®</sup> - A Java PDF Library</h1> + <h1 id="apache-pdfboxsupregsup---a-java-pdf-library">Apache PDFBox<sup>®</sup> - A Java PDF Library</h1> <p class="lead">The Apache PDFBox<sup>®</sup> library is an open source Java tool for working with PDF documents. This project allows creation of new PDF documents, manipulation of existing @@ -175,7 +175,7 @@ Apache PDFBox version 2.0.7. It is available for download at:</p> <h2 id="getting-help">Getting Help</h2> -<p>To get help on using PDFBox, please <a href="mailto:[email protected]">Subscribe to the Users Mailing List</a> and post your +<p>To get help on using PDFBox, please <a href="mailto:users-subscribe@pdfbox.apache.org">Subscribe to the Users Mailing List</a> and post your questions there. Weâre happy to help.</p> <p>The project is a volunteer effort and weâre always looking for interested people to help @@ -186,38 +186,38 @@ skills. Subscribe to the <a href="/mailinglists.html">Mailing Lists</a> and find <div class="row"> <div class="col-md-3"> - <header><h4><svg aria-hidden="true" class="open-iconic open-iconic-box" width="8" height="8" viewBox="0 0 8 8" role="img" version="1.1" alt="box image"><path d="M0 0v1h8v-1h-8zm0 2v5.91c0 .05.04.09.09.09h7.81c.05 0 .09-.04.09-.09v-5.91h-2.97v1.03h-2.03v-1.03h-3z" /></svg>Extract Text</h4></header> + <header><h4><svg aria-hidden="true" class="open-iconic open-iconic-box" width="8" height="8" viewbox="0 0 8 8" role="img" version="1.1" alt="box image"><path d="M0 0v1h8v-1h-8zm0 2v5.91c0 .05.04.09.09.09h7.81c.05 0 .09-.04.09-.09v-5.91h-2.97v1.03h-2.03v-1.03h-3z" /></svg>Extract Text</h4></header> <p>Extract Unicode text from PDF files.</p> </div> <div class="col-md-3"> - <header><h4><svg aria-hidden="true" class="open-iconic open-iconic-box" width="8" height="8" viewBox="0 0 8 8" role="img" version="1.1" alt="box image"><path d="M0 0v1h8v-1h-8zm0 2v5.91c0 .05.04.09.09.09h7.81c.05 0 .09-.04.09-.09v-5.91h-2.97v1.03h-2.03v-1.03h-3z" /></svg>Split & Merge</h4></header> + <header><h4><svg aria-hidden="true" class="open-iconic open-iconic-box" width="8" height="8" viewbox="0 0 8 8" role="img" version="1.1" alt="box image"><path d="M0 0v1h8v-1h-8zm0 2v5.91c0 .05.04.09.09.09h7.81c.05 0 .09-.04.09-.09v-5.91h-2.97v1.03h-2.03v-1.03h-3z" /></svg>Split & Merge</h4></header> <p>Split a single PDF into many files or merge multiple PDF files.</p> </div> <div class="col-md-3"> - <header><h4><svg aria-hidden="true" class="open-iconic open-iconic-box" width="8" height="8" viewBox="0 0 8 8" role="img" version="1.1" alt="box image"><path d="M0 0v1h8v-1h-8zm0 2v5.91c0 .05.04.09.09.09h7.81c.05 0 .09-.04.09-.09v-5.91h-2.97v1.03h-2.03v-1.03h-3z" /></svg>Fill Forms</h4></header> + <header><h4><svg aria-hidden="true" class="open-iconic open-iconic-box" width="8" height="8" viewbox="0 0 8 8" role="img" version="1.1" alt="box image"><path d="M0 0v1h8v-1h-8zm0 2v5.91c0 .05.04.09.09.09h7.81c.05 0 .09-.04.09-.09v-5.91h-2.97v1.03h-2.03v-1.03h-3z" /></svg>Fill Forms</h4></header> <p>Extract data from PDF forms or fill a PDF form.</p> </div> <div class="col-md-3"> - <header><h4><svg aria-hidden="true" class="open-iconic open-iconic-box" width="8" height="8" viewBox="0 0 8 8" role="img" version="1.1" alt="box image"><path d="M0 0v1h8v-1h-8zm0 2v5.91c0 .05.04.09.09.09h7.81c.05 0 .09-.04.09-.09v-5.91h-2.97v1.03h-2.03v-1.03h-3z" /></svg>Preflight</h4></header> + <header><h4><svg aria-hidden="true" class="open-iconic open-iconic-box" width="8" height="8" viewbox="0 0 8 8" role="img" version="1.1" alt="box image"><path d="M0 0v1h8v-1h-8zm0 2v5.91c0 .05.04.09.09.09h7.81c.05 0 .09-.04.09-.09v-5.91h-2.97v1.03h-2.03v-1.03h-3z" /></svg>Preflight</h4></header> <p>Validate PDF files against the PDF/A-1b standard.</p> </div> </div> <div class="row"> <div class="col-md-3"> - <header><h4><svg aria-hidden="true" class="open-iconic open-iconic-box" width="8" height="8" viewBox="0 0 8 8" role="img" version="1.1" alt="box image"><path d="M0 0v1h8v-1h-8zm0 2v5.91c0 .05.04.09.09.09h7.81c.05 0 .09-.04.09-.09v-5.91h-2.97v1.03h-2.03v-1.03h-3z" /></svg>Print</h4></header> + <header><h4><svg aria-hidden="true" class="open-iconic open-iconic-box" width="8" height="8" viewbox="0 0 8 8" role="img" version="1.1" alt="box image"><path d="M0 0v1h8v-1h-8zm0 2v5.91c0 .05.04.09.09.09h7.81c.05 0 .09-.04.09-.09v-5.91h-2.97v1.03h-2.03v-1.03h-3z" /></svg>Print</h4></header> <p>Print a PDF file using the standard Java printing API.</p> </div> <div class="col-md-3"> - <header><h4><svg aria-hidden="true" class="open-iconic open-iconic-box" width="8" height="8" viewBox="0 0 8 8" role="img" version="1.1" alt="box image"><path d="M0 0v1h8v-1h-8zm0 2v5.91c0 .05.04.09.09.09h7.81c.05 0 .09-.04.09-.09v-5.91h-2.97v1.03h-2.03v-1.03h-3z" /></svg>Save as Image</h4></header> + <header><h4><svg aria-hidden="true" class="open-iconic open-iconic-box" width="8" height="8" viewbox="0 0 8 8" role="img" version="1.1" alt="box image"><path d="M0 0v1h8v-1h-8zm0 2v5.91c0 .05.04.09.09.09h7.81c.05 0 .09-.04.09-.09v-5.91h-2.97v1.03h-2.03v-1.03h-3z" /></svg>Save as Image</h4></header> <p>Save PDFs as image files, such as PNG or JPEG.</p> </div> <div class="col-md-3"> - <header><h4><svg aria-hidden="true" class="open-iconic open-iconic-box" width="8" height="8" viewBox="0 0 8 8" role="img" version="1.1" alt="box image"><path d="M0 0v1h8v-1h-8zm0 2v5.91c0 .05.04.09.09.09h7.81c.05 0 .09-.04.09-.09v-5.91h-2.97v1.03h-2.03v-1.03h-3z" /></svg>Create PDFs</h4></header> + <header><h4><svg aria-hidden="true" class="open-iconic open-iconic-box" width="8" height="8" viewbox="0 0 8 8" role="img" version="1.1" alt="box image"><path d="M0 0v1h8v-1h-8zm0 2v5.91c0 .05.04.09.09.09h7.81c.05 0 .09-.04.09-.09v-5.91h-2.97v1.03h-2.03v-1.03h-3z" /></svg>Create PDFs</h4></header> <p>Create a PDF from scratch, with embedded fonts and images.</p> </div> <div class="col-md-3"> - <header><h4><svg aria-hidden="true" class="open-iconic open-iconic-box" width="8" height="8" viewBox="0 0 8 8" role="img" version="1.1" alt="box image"><path d="M0 0v1h8v-1h-8zm0 2v5.91c0 .05.04.09.09.09h7.81c.05 0 .09-.04.09-.09v-5.91h-2.97v1.03h-2.03v-1.03h-3z" /></svg>Signing</h4></header> + <header><h4><svg aria-hidden="true" class="open-iconic open-iconic-box" width="8" height="8" viewbox="0 0 8 8" role="img" version="1.1" alt="box image"><path d="M0 0v1h8v-1h-8zm0 2v5.91c0 .05.04.09.09.09h7.81c.05 0 .09-.04.09-.09v-5.91h-2.97v1.03h-2.03v-1.03h-3z" /></svg>Signing</h4></header> <p>Digitally sign PDF files.</p> </div> </div> http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/a51cb0da/content/mailinglists.html ---------------------------------------------------------------------- diff --git a/content/mailinglists.html b/content/mailinglists.html index 64b5e9c..11ff844 100644 --- a/content/mailinglists.html +++ b/content/mailinglists.html @@ -190,27 +190,27 @@ to the <strong>Commit Mailing List</strong>.</p> <tr> <td>Users</td> <td>[email protected]</td> - <td><a href="mailto:[email protected]">Subscribe</a></td> - <td><a href="mailto:[email protected]">Unsubscribe</a></td> - <td><a href="mailto:[email protected]">Help</a></td> + <td><a href="mailto:users-subscribe@pdfbox.apache.org">Subscribe</a></td> + <td><a href="mailto:users-unsubscribe@pdfbox.apache.org">Unsubscribe</a></td> + <td><a href="mailto:users-help@pdfbox.apache.org">Help</a></td> <td><a href="https://lists.apache.org/[email protected]">Archive</a></td> <td><a href="http://pdfbox-users.markmail.org/">MarkMail</a></td> </tr> <tr> <td>Developers</td> <td>[email protected]</td> - <td><a href="mailto:[email protected]">Subscribe</a></td> - <td><a href="mailto:[email protected]">Unsubscribe</a></td> - <td><a href="mailto:[email protected]">Help</a></td> + <td><a href="mailto:dev-subscribe@pdfbox.apache.org">Subscribe</a></td> + <td><a href="mailto:dev-unsubscribe@pdfbox.apache.org">Unsubscribe</a></td> + <td><a href="mailto:dev-help@pdfbox.apache.org">Help</a></td> <td><a href="https://lists.apache.org/[email protected]">Archive</a></td> <td><a href="http://pdfbox-dev.markmail.org/">MarkMail</a></td> </tr> <tr> <td>Commits List</td> <td>[email protected]</td> - <td><a href="mailto:[email protected]">Subscribe</a></td> - <td><a href="mailto:[email protected]">Unsubscribe</a></td> - <td><a href="mailto:[email protected]">Help</a></td> + <td><a href="mailto:commits-subscribe@pdfbox.apache.org">Subscribe</a></td> + <td><a href="mailto:commits-unsubscribe@pdfbox.apache.org">Unsubscribe</a></td> + <td><a href="mailto:commits-help@pdfbox.apache.org">Help</a></td> <td><a href="https://lists.apache.org/[email protected]">Archive</a></td> <td><a href="http://pdfbox-commits.markmail.org/">MarkMail</a></td> </tr> http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/a51cb0da/content/siteupdate.html ---------------------------------------------------------------------- diff --git a/content/siteupdate.html b/content/siteupdate.html index 83f11b5..f042e5b 100644 --- a/content/siteupdate.html +++ b/content/siteupdate.html @@ -196,7 +196,7 @@ <p>Add the following server configuration in your ~/.m2/settings.xml file</p> -<div class="language-xml highlighter-rouge"><pre class="highlight"><code><span class="nt"><server></span> +<div class="highlighter-rouge"><pre class="highlight"><code><span class="nt"><server></span> <span class="nt"><id></span>pdfbox-site<span class="nt"></id></span> <span class="nt"><username></span>** USERNAME **<span class="nt"></username></span> <span class="nt"><password></span>** PASSWORD **<span class="nt"></password></span>
