This is an automated email from the ASF dual-hosted git repository. lehmi pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/pdfbox-docs.git
The following commit(s) were added to refs/heads/asf-site by this push: new 4f65d71c Site checkin for project Apache PDFBox Website 4f65d71c is described below commit 4f65d71c1c633d0fbc846adebc9c738acb4ca228 Author: Andreas Lehmkühler <andr...@lehmi.de> AuthorDate: Sun Aug 20 13:01:57 2023 +0200 Site checkin for project Apache PDFBox Website --- content/2.0/getting-started.html | 2 +- content/3.0/commandline.html | 935 ++++++++++++++++++++++++++++++ content/3.0/dependencies.html | 218 +++++++ content/{2.0 => 3.0}/getting-started.html | 31 +- content/3.0/migration.html | 12 + content/blog/index.html | 3 + content/building.html | 3 + content/codingconventions.html | 3 + content/download.html | 3 + content/errors/403.html | 3 + content/errors/404.html | 3 + content/ideas.html | 3 + content/index.html | 3 + content/mailinglists.html | 3 + content/references.html | 3 + content/security.html | 3 + content/siteupdate.html | 3 + content/support.html | 3 + content/team.html | 3 + 19 files changed, 1215 insertions(+), 25 deletions(-) diff --git a/content/2.0/getting-started.html b/content/2.0/getting-started.html index 50f5ff23..503a11c7 100644 --- a/content/2.0/getting-started.html +++ b/content/2.0/getting-started.html @@ -129,7 +129,7 @@ <h1 id="getting-started" tabindex="-1">Getting Started</h1> <h2 id="maven" tabindex="-1">Maven</h2> <p>To use the latest release you'll need to add the following dependency:</p> -<pre class="language-xml"><code class="language-xml"><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>dependency</span><span class="token punctuation">></span></span><br> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>groupId</span><span class="token punctuation">></span></span>org.apache.pdfbox<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>groupId</span><sp [...] +<pre class="language-xml"><code class="language-xml"><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>dependency</span><span class="token punctuation">></span></span><br> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>groupId</span><span class="token punctuation">></span></span>org.apache.pdfbox<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>groupId</span><sp [...] <h2 id="pdfbox-and-java-8" tabindex="-1">PDFBox and Java 8</h2> <p class="alert alert-warning">Important notice when using PDFBox with Java 8 before 1.8.0_191 or Java 9 before 9.0.4</p> <p>Due to the change of the java color management module towards "LittleCMS", users can experience slow performance in color operations. diff --git a/content/3.0/commandline.html b/content/3.0/commandline.html new file mode 100644 index 00000000..cb47d450 --- /dev/null +++ b/content/3.0/commandline.html @@ -0,0 +1,935 @@ +<!DOCTYPE html> +<html lang="en"> + +<!-- + + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE- 2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + +<head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta name="description" content="The Apache PDFBox™ library is an open source Java tool for working with PDF documents. This project allows creation of new PDF documents, manipulation of existing documents and the ability to extract content from documents. Apache PDFBox also includes several command-line utilities. Apache PDFBox is published under the Apache License v2.0."> + + <title>Apache PDFBox | Command-Line Tools</title> + + <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet"> + <link href="/css/prism.css" rel="stylesheet"> + <link href="/css/styles.css" rel="stylesheet"> + + + + + + + +</head> + + +<body> + + <header class="main-header"> + <div class="main-header-logo"> + <a href="/" aria-label="Navigation to the PDFBox home page"> + <svg focusable="false" class="pdfbox-brand-toolbox" viewBox="0 0 744.09448819 1052.3622047" xmlns="http://www.w3.org/2000/svg" aria-labelledby="brandImageTitle brandImageDesc" role="img"> + <title id="brandImageTitle">PDFBox Brand Logo</title> + <desc id="brandImageDesc">The PDFBox logo showing a toolbox.</desc> + <g transform="matrix(1.25 0 0 -1.25 -317.14 1018.08)" clip-path="url(#clipPath3375)"> + <path d="M821.924 376.535L463.24 122.525l-203.83 76.86c23.89 6.02 46.87 15.197 68.335 27.29 60.063 33.835 105.686 88.46 128.282 153.59 2.634 4.66 8.11 6.92 13.265 5.47 4.667-1.31 8.01-5.41 8.353-10.247l-3.572-188.12 334.99 193.957c2.41 1 5.113 1.028 7.54.075 2.315-.907 4.21-2.64 5.32-4.865zm-1.307 97.91l.13-78.324c-.87-2.72-3.342-4.61-6.197-4.75-3.104-.14-5.924 1.8-6.893 4.75l1.29 79.54c.386 2.92 2.893 5.09 5.835 5.04 3.37-.04 6.022-2.89 5.835-6.25z"/> + <path d="M751.88 651.666c-.237.002-.48-.022-.723-.077l-363.512-25.15c-10.37-.73-19.583-6.76-24.588-15.87-6.943-12.64-4.677-28.26 5.864-37.72 2.85-2.56 6.22-4.49 8.97-7.16 2.19-2.12 3.93-4.65 5.12-7.45 23.7-26.86 30.3-64.76 17.08-98.05-4.75-11.96-11.97-22.77-21.2-31.73l-73.74 16.1 46.69 115.89c2.01 3.07.64 7.21-2.8 8.49-2.8 1.03-5.91-.34-7.03-3.1L286.49 448.8l-11.79 4.32c-2.097.28-4.21-.39-5.76-1.825-1.16-1.077-1.925-2.516-2.16-4.083l-11.53-189.68c1.66-1.83 4.03-2.85 6.5-2.798 2.533.0 [...] + <path d="M786.68 627.94c.393-18.97 2.614-37.734 6.564-56.05 3.873-17.958 9.463-35.75 19.087-51.71 3.54-5.854 7.58-11.385 12.08-16.53 1.07-1.608 1.71-3.462 1.86-5.386.14-1.842-.16-3.69-.9-5.385-54.19-15.56-108.32-31.34-162.39-47.35-54.2-16.05-108.33-32.33-162.39-48.85-.23 1.43.04 2.9.78 4.15 1.07 1.81 2.96 2.99 5.06 3.13l271.54 104.43c-4.43 19.56-7.17 39.46-8.19 59.49-.99 19.68-.32 39.4 2.02 58.97.81 4.06 4.63 6.79 8.74 6.24 2.88-.39 5.27-2.4 6.15-5.16z"/> + </g> +</svg> + + <svg focusable="false" class="pdfbox-brand-text" xmlns="http://www.w3.org/2000/svg" style="isolation:isolate" viewBox="0 0 109.81066666651577 30.943999999957384" aria-labelledby="brandTextTitle brandTextDesc" role="img"> + <title id="brandTextTitle">PDFBox brand text</title> + <desc id="brandTextDesc">PDFBox, the brand text.</desc> + <path d="M0 .31h6.528q1.792 0 3.157.47 1.366.468 2.475 1.663 1.11 1.194 1.536 2.816.427 1.57.427 4.3 0 2-.256 3.45-.214 1.41-.982 2.64-.896 1.492-2.39 2.345-1.492.81-3.924.81H4.36v11.87H0V.305zm4.352 14.42h2.09q1.323 0 2.05-.383.724-.384 1.065-1.024.342-.683.384-1.622.09-.93.09-2.09 0-1.06-.08-2-.04-.98-.38-1.66-.3-.72-.98-1.11-.68-.43-1.96-.43H4.36v10.32z" fill-rule="evenodd"/> + <path d="M17.333.31h6.443q3.712 0 5.675 2.09 1.97 2.048 1.97 5.76v14.208q0 4.267-2.09 6.315-2.05 2.005-5.93 2.005h-6.06V.308zm4.352 26.282h2.006q1.84 0 2.61-.896.77-.94.77-2.9V8.16q0-1.792-.72-2.773-.72-.982-2.64-.982H21.7v22.187z" fill-rule="evenodd"/> + <path d="M35.583.31h12.97v4.095h-8.618v9.216h7.51v4.1h-7.51v12.97h-4.352V.31z"/> + <path d="M51.417.31h6.357q2.09 0 3.54.64 1.495.64 2.433 1.706.94 1.067 1.323 2.475.427 1.37.427 2.86V9.1q0 1.236-.214 2.09-.17.853-.554 1.493-.39.64-.94 1.152-.56.47-1.28.896 1.53.73 2.26 2.18.72 1.41.72 3.8v1.71q0 4.01-1.97 6.15-1.92 2.13-6.19 2.13H51.4V.31zm4.352 26.026h1.87q1.32 0 2.05-.384.77-.384 1.15-1.067.38-.682.47-1.62.08-.94.08-2.05 0-1.15-.13-2.004-.13-.85-.56-1.4-.386-.6-1.11-.89-.727-.3-1.92-.3h-1.92v9.73zm0-13.568h1.96q2.17 0 2.9-1.067.77-1.1.77-3.2 0-2.04-.86-3.07-.81-1. [...] + <path d="M69.027 16.31q0-1.323.17-2.433.17-1.11.64-1.962.768-1.408 2.22-2.262 1.45-.853 3.455-.853t3.456.853q1.45.854 2.22 2.262.468.853.64 1.962.17 1.11.17 2.432v7.12q0 1.32-.17 2.43-.172 1.11-.64 1.96-.77 1.4-2.22 2.26-1.45.85-3.456.85-2.005 0-3.456-.86-1.45-.854-2.22-2.26-.468-.855-.64-1.964-.17-1.11-.17-2.43V16.3zm4.352 7.807q0 1.238.55 1.878.6.597 1.58.597.98 0 1.53-.597.59-.64.59-1.878v-8.49q0-1.238-.6-1.835-.557-.64-1.538-.64-.98 0-1.58.64-.553.597-.553 1.835v8.49z" fill-rule="e [...] + <path d="M88.316 19.637L83.24 9.057h4.607l2.688 6.143 2.688-6.144h4.608l-5.16 10.58 5.42 11.052h-4.61l-2.94-6.613-2.94 6.613h-4.61l5.34-11.05z"/> + <path d="M102.883 5.28h1.2q.784 0 1.168-.224.4-.24.4-.784 0-.464-.35-.672-.33-.224-.88-.224h-1.53V5.28zm-1.056-2.864h2.56q2.32 0 2.32 1.904 0 .48-.144.816-.128.336-.368.56-.24.224-.56.352-.304.112-.656.16l1.93 2.96h-1.28L103.7 6.24h-.817v2.928h-1.056V2.416zm6.832 3.376q0-.976-.37-1.84-.37-.864-.99-1.504-.63-.64-1.48-1.008-.85-.384-1.81-.384t-1.81.384q-.85.368-1.47 1.008t-1 1.504-.37 1.84q0 .976.364 1.84.37.864.992 1.504t1.47 1.024q.85.368 1.81.368.96 0 1.805-.368.85-.384 1.47-1.024.625 [...] +</svg> + + </a> + </div> + <nav class="wrapper"> + <input type="checkbox" id="menu-toggle"> + <label for="menu-toggle" class="label-toggle"></label> + <ul> + <li><a href="/blog">Blog</a></li> + </ul> + </nav> +</header> + + + + + <div class="container documentation"> + <nav class="accordion-menu" role="navigation"> + <h1>Documentation</h1> + <ul><li> + <a href="/3.0/migration.html" > + Migration + </a> + </li><li> + <a href="/3.0/getting-started.html" > + Getting Started + </a> + </li><li> + <a href="/3.0/dependencies.html" > + Dependencies + </a> + </li><li> + <a href="/3.0/commandline.html" > + Command-Line Tools + </a> + </li><li> + <a href="https://javadoc.io/doc/org.apache.pdfbox/pdfbox/3.0.0-alpha3/index.html" > + API Docs <small>via javadoc.io</small> + </a> + </li> + </ul> + </nav> + + <section> + <h1 id="command-line-tools" tabindex="-1">Command-Line Tools</h1> +<p>PDFBox comes with a series of command-line utilities. They are available as standard Java applications.</p> +<p>See the <a href="/3.0/dependencies.html">Dependencies</a> page for instructions on how to set your classpath in order to run +PDFBox tools as Java applications.</p> +<h2 id="decrypt" tabindex="-1">Decrypt</h2> +<p>This application will decrypt a PDF document.</p> +<p>NOTE: You must have the owner password to decrypt the document!</p> +<p>Usage: <code>java -jar pdfbox-app-3.y.z.jar decrypt [OPTIONS] -i=<infile></code></p> +<table> +<thead> +<tr> +<th>Command-Line Parameter</th> +<th>Description</th> +</tr> +</thead> +<tbody> +<tr> +<td>-alias=<alias></td> +<td>The alias to the certificate in the keystore.</td> +</tr> +<tr> +<td>-h, --help</td> +<td>Show help message and exit.</td> +</tr> +<tr> +<td>-i, --input=<infile></td> +<td>The PDF file to decrypt.</td> +</tr> +<tr> +<td>-keyStore=<keyStore></td> +<td>Path to keystore that holds certificate to decrypt the document. This is only required if the document is encrypted with a certificate, otherwise only the password is required.</td> +</tr> +<tr> +<td>-o, --output=<outfile></td> +<td>The file to save the decrypted document to. If left blank then it will be the same as the input file.</td> +</tr> +<tr> +<td>-password=[<password>]</td> +<td>Password to the PDF or certificate in keystore.</td> +</tr> +<tr> +<td>-V, --version</td> +<td>Print version information and exit.</td> +</tr> +</tbody> +</table> +<h2 id="encrypt" tabindex="-1">Encrypt</h2> +<p>This application will encrypt a PDF document.</p> +<p>Usage: <code>java -jar pdfbox-app-3.y.z.jar encrypt [OPTIONS] -i=<infile></code></p> +<table> +<thead> +<tr> +<th>Command-Line Parameter</th> +<th>Default</th> +<th>Description</th> +</tr> +</thead> +<tbody> +<tr> +<td>-canAssemble</td> +<td>true</td> +<td>Set the assemble permission.</td> +</tr> +<tr> +<td>-canExtractContent</td> +<td>true</td> +<td>Set the extraction permission.</td> +</tr> +<tr> +<td>-canExtractForAccessibility</td> +<td>true</td> +<td>Set the extraction permission.</td> +</tr> +<tr> +<td>-canFillInForm</td> +<td>true</td> +<td>Set the fill in form permission.</td> +</tr> +<tr> +<td>-canModify</td> +<td>true</td> +<td>Set the modify permission.</td> +</tr> +<tr> +<td>-canModifyAnnotations</td> +<td>true</td> +<td>Set the modify annots permission.</td> +</tr> +<tr> +<td>-canPrint</td> +<td>true</td> +<td>Set the print permission.</td> +</tr> +<tr> +<td>-canPrintFaithful</td> +<td>true</td> +<td>Set the print faithful permission.</td> +</tr> +<tr> +<td>-certFile=<certFile></td> +<td></td> +<td>Path to X.509 cert file.</td> +</tr> +<tr> +<td>-h, --help</td> +<td></td> +<td>Show help message and exit.</td> +</tr> +<tr> +<td>-i, --input=<infile></td> +<td></td> +<td>The PDF file to encrypt.</td> +</tr> +<tr> +<td>-keyLength</td> +<td>256</td> +<td>Key length in bits (valid values: 40, 128 or 256)</td> +</tr> +<tr> +<td>-o, --output=<outfile></td> +<td></td> +<td>the encrypted PDF file. If omitted the original file is overwritten.</td> +</tr> +<tr> +<td>-O=[<ownerPassword>]</td> +<td></td> +<td>set the owner password (ignored if certFile is set)</td> +</tr> +<tr> +<td>-U=[<userPassword>]</td> +<td></td> +<td>set the user password (ignored if certFile is set)</td> +</tr> +<tr> +<td>-V, --version</td> +<td></td> +<td>Print version information and exit.</td> +</tr> +</tbody> +</table> +<h2 id="extractimages" tabindex="-1">ExtractImages</h2> +<p>This application will extract all images from the given PDF document.</p> +<p>Usage: <code>java -jar pdfbox-app-3.y.z.jar export:images [OPTIONS] -i=<infile></code></p> +<table> +<thead> +<tr> +<th>Command-Line Parameter</th> +<th>Description</th> +</tr> +</thead> +<tbody> +<tr> +<td>-h, --help</td> +<td>Show help message and exit.</td> +</tr> +<tr> +<td>-i, --input=<infile></td> +<td>The PDF file to decrypt.</td> +</tr> +<tr> +<td>-noColorConvert</td> +<td>Images are extracted with their original colorspace if possible.</td> +</tr> +<tr> +<td>-password=[<password>]</td> +<td>Password for the PDF or certificate in keystore.</td> +</tr> +<tr> +<td>-prefix=<prefix></td> +<td>the image prefix (default to pdf name).</td> +</tr> +<tr> +<td>-useDirectJPEG</td> +<td>Forces the direct extraction of JPEG/JPX images regardless of colorspace or masking.</td> +</tr> +<tr> +<td>-V, --version</td> +<td>Print version information and exit.</td> +</tr> +</tbody> +</table> +<h2 id="extracttext" tabindex="-1">ExtractText</h2> +<p>This application will extract all text from the given PDF document.</p> +<p>Usage: <code>java -jar pdfbox-app-3.y.z.jar export:text [OPTIONS] -i=<infile></code></p> +<table> +<thead> +<tr> +<th>Command-Line Parameter</th> +<th>Default</th> +<th>Description</th> +</tr> +</thead> +<tbody> +<tr> +<td>-alwaysNext</td> +<td>false</td> +<td>Process next page (if applicable) despite IOException (ignored when -html)</td> +</tr> +<tr> +<td>-console</td> +<td>false</td> +<td>Send text to console instead of file.</td> +</tr> +<tr> +<td>-debug</td> +<td>false</td> +<td>Enables debug output about the time consumption of every stage.</td> +</tr> +<tr> +<td>-encoding=<encoding></td> +<td>UTF-8</td> +<td>The encoding type of the text file, e.g. UTF-8 or ISO-8859-1, UTF-16BE, UTF-16LE, etc.</td> +</tr> +<tr> +<td>-endPage=<endPage></td> +<td>Integer.MAX_INT</td> +<td>The last page to extract (1 based, inclusive)</td> +</tr> +<tr> +<td>-h, --help</td> +<td></td> +<td>Show help message and exit.</td> +</tr> +<tr> +<td>-html</td> +<td>false</td> +<td>Output in HTML format instead of raw text.</td> +</tr> +<tr> +<td>-i, --input=<infile></td> +<td></td> +<td>The PDF file to encrypt.</td> +</tr> +<tr> +<td>-ignoreBeads</td> +<td>false</td> +<td>Disables the separation by beads.</td> +</tr> +<tr> +<td>-o, --output=<outfile></td> +<td></td> +<td>the exported text file.</td> +</tr> +<tr> +<td>-password=[<password>]</td> +<td></td> +<td>Password for the PDF or certificate in keystore.</td> +</tr> +<tr> +<td>-rotationMagic</td> +<td>false</td> +<td>Analyze each page for rotated/skewed text, rotate to 0° and extract separately (slower, and ignored when -html)</td> +</tr> +<tr> +<td>-sort</td> +<td>false</td> +<td>Sort the text before writing.</td> +</tr> +<tr> +<td>-startPage=<startPage></td> +<td>1</td> +<td>The first page to start extraction (1 based, inclusive)</td> +</tr> +<tr> +<td>-V, --version</td> +<td></td> +<td>Print version information and exit.</td> +</tr> +</tbody> +</table> +<h2 id="overlaypdf" tabindex="-1">OverlayPDF</h2> +<p>This application will overlay one document with the content of another document</p> +<p>Usage: <code>java -jar pdfbox-app-3.y.z.jar overlayPDF [OPTIONS] -i=<infile> -o=<outfile></code></p> +<table> +<thead> +<tr> +<th>Command-Line Parameter</th> +<th>Default</th> +<th>Description</th> +</tr> +</thead> +<tbody> +<tr> +<td>-default=<defaultOverlay></td> +<td></td> +<td>the default overlay file.</td> +</tr> +<tr> +<td>-even=<evenPageOverlay></td> +<td></td> +<td>overlay file used for even pages.</td> +</tr> +<tr> +<td>-first=<firstPageOverlay</td> +<td></td> +<td>overlay file used for the first page.</td> +</tr> +<tr> +<td>-h, --help</td> +<td></td> +<td>Show help message and exit.</td> +</tr> +<tr> +<td>-i, --input=<infile></td> +<td></td> +<td>the PDF file to be overlayed.</td> +</tr> +<tr> +<td>-last=<lastPageOverlay></td> +<td></td> +<td>Overlay file used for the last pages.</td> +</tr> +<tr> +<td>-o, --output=<outfile></td> +<td></td> +<td>the resulting PDF file.</td> +</tr> +<tr> +<td>-odd=<oddPageOverlay></td> +<td></td> +<td>overlay file used for odd pages.</td> +</tr> +<tr> +<td>-page=<Integer=specificPageOverlay></td> +<td></td> +<td>overlay file used for the given page number, may occur more than once.</td> +</tr> +<tr> +<td>-position=<position></td> +<td>background</td> +<td>Where to put the overlay, foreground or background.</td> +</tr> +<tr> +<td>-useAllPages=<useAllPagesOverlay</td> +<td></td> +<td>overlay file used for overlay, all pages are used by simply repeating them</td> +</tr> +<tr> +<td>-V, --version</td> +<td></td> +<td>Print version information and exit.</td> +</tr> +</tbody> +</table> +<p>Examples:</p> +<ul> +<li>overlayPDF -i=input.pdf -default=overlay.pdf -o=output.pdf</li> +<li>overlayPDF -i=input.pdf -default=defaultOverlay.pdf -page="10=overlayForPage10.pdf" -position=foreground -o=output.pdf</li> +<li>overlayPDF -i=input.pdf -odd=oddOverlay.pdf -even=evenOverlay.pdf -o=output.pdf</li> +</ul> +<h2 id="pdfdebugger" tabindex="-1">PDFDebugger</h2> +<p>This application will take an existing PDF document and allows to analyze and inspect the internal structure. +It is used as replacement for the PDFReader which was removed in 2.0.0.</p> +<p>Usage: <code>java -jar pdfbox-app-3.y.z.jar debug [inputfile]</code></p> +<table> +<thead> +<tr> +<th>Command-Line Parameter</th> +<th>Description</th> +</tr> +</thead> +<tbody> +<tr> +<td>inputfile</td> +<td>the name of an optional PDF file to open.</td> +</tr> +<tr> +<td>-h, --help</td> +<td>Show help message and exit.</td> +</tr> +<tr> +<td>-password=[<password>]</td> +<td>password to derypt the PDF.</td> +</tr> +<tr> +<td>-viewstructure</td> +<td>Activates the "view structure" view on startup.</td> +</tr> +</tbody> +</table> +<h2 id="pdfmerger" tabindex="-1">PDFMerger</h2> +<p>This application will take a list of pdf documents and merge them, saving the result in a new document.</p> +<p>Usage: <code>java -jar pdfbox-app-3.y.z.jar merge [-hV] -o=outfile -i=<infile> [-i=<infile>]</code></p> +<table> +<thead> +<tr> +<th>Command-Line Parameter</th> +<th>Description</th> +</tr> +</thead> +<tbody> +<tr> +<td>-h, --help</td> +<td>Show help message and exit.</td> +</tr> +<tr> +<td>-i, --input=<infile></td> +<td>the PDF files to merge</td> +</tr> +<tr> +<td>-o, --output=<outfile></td> +<td>the merged PDF file.</td> +</tr> +<tr> +<td>-V, --version</td> +<td>Print version information and exit.</td> +</tr> +</tbody> +</table> +<h2 id="pdfsplit" tabindex="-1">PDFSplit</h2> +<p>This application will take an existing PDF document and split it into a number of new documents.</p> +<p>Per default the resulting files will be named after the original filenmame with <code>-<nr></code> appended before the suffix. +To override the filename use the <code>outputPrefix</code> option.</p> +<p>Usage: <code>java -jar pdfbox-app-3.y.z.jar split [OPTIONS] -i=<infile></code></p> +<table> +<thead> +<tr> +<th>Command-Line Parameter</th> +<th>Description</th> +</tr> +</thead> +<tbody> +<tr> +<td>-endPage=<endPage></td> +<td>end page.</td> +</tr> +<tr> +<td>-h, --help</td> +<td>Show help message and exit.</td> +</tr> +<tr> +<td>-i, --input=<infile></td> +<td>the PDF file to split</td> +</tr> +<tr> +<td>--outputPrefix=<outputPrefix></td> +<td>the filename prefix for split files.</td> +</tr> +<tr> +<td>-password=[<password>]</td> +<td>Password to the PDF.</td> +</tr> +<tr> +<td>-split=<split></td> +<td>split after this many pages (default 1, if startPage and endPage are unset).</td> +</tr> +<tr> +<td>-startPage=<startPage></td> +<td>start page.</td> +</tr> +<tr> +<td>-endPage</td> +<td>The page to stop at.</td> +</tr> +<tr> +<td>-V, --version</td> +<td>Print version information and exit.</td> +</tr> +</tbody> +</table> +<p>Examples:</p> +<ul> +<li>PDFSplit -split=2 -i=sample_with_13_pages.pdf will split the pdf in pieces of 2 pages each except the last which will contain 1 page only.</li> +<li>PDFSplit -startPage=5 -i=sample_with_13_pages.pdf will provide a pdf containing all pages of the source pdf starting at page 5</li> +<li>PDFSplit -startPage=5 -endPage=10 -i=sample_with_13_pages.pdf will provide a pdf containing all pages from 5 to 10 of the source pdf</li> +<li>PDFSplit -split=2 -startPage=5 -endPage=10 -isample_with_13_pages.pdf will provide 3 pdfs containing all pages from 5 to 10 of the source pdf 2 pages each</li> +</ul> +<h2 id="pdftoimage" tabindex="-1">PDFToImage</h2> +<p>This application will create an image for every page in the PDF document.</p> +<p>Usage: <code>java -jar pdfbox-app-3.y.z.jar render [OPTIONS] -i=<infile></code></p> +<table> +<thead> +<tr> +<th>Command-Line Parameter</th> +<th>Default</th> +<th>Description</th> +</tr> +</thead> +<tbody> +<tr> +<td>-color=<imageType></td> +<td>rgb</td> +<td>The color depth (valid: BINARY, GRAY, RGB, ARGB, BGR)</td> +</tr> +<tr> +<td>-cropbox=<int> <int> <int> <int></td> +<td></td> +<td>The page area to export.</td> +</tr> +<tr> +<td>-dpi, -resolution=<dpi></td> +<td>detected from screen (or 96 if headless)</td> +<td>the DPI of the output image</td> +</tr> +<tr> +<td>-endPage=<endPage></td> +<td>Integer.MAX_INT</td> +<td>The last page to convert, (one based, inclusive).</td> +</tr> +<tr> +<td>-format=<imageFormat></td> +<td>jpg</td> +<td>The image file format.</td> +</tr> +<tr> +<td>-h, --help</td> +<td></td> +<td>Show help message and exit.</td> +</tr> +<tr> +<td>-i, --input=<infile></td> +<td></td> +<td>the PDF file to convert.</td> +</tr> +<tr> +<td>-page=<page></td> +<td></td> +<td>The only page to extract (1-based).</td> +</tr> +<tr> +<td>-password=[<password>]</td> +<td></td> +<td>Password for the PDF.</td> +</tr> +<tr> +<td>-prefix, -outputPrefix=<outputPrefix></td> +<td>Name of PDF document</td> +<td>the filename prefix for image files</td> +</tr> +<tr> +<td>-quality=<quality></td> +<td>0 for PNG and 1 for other formats</td> +<td>the quality to be used when compressing the image (0 <= quality <= 1).</td> +</tr> +<tr> +<td>-startPage=<startPage></td> +<td>1</td> +<td>the first page to start extraction (one based)</td> +</tr> +<tr> +<td>-subSampling</td> +<td></td> +<td>activate subsampling (for PDFs with huge images)</td> +</tr> +<tr> +<td>-time</td> +<td></td> +<td>print timing information to stdout.</td> +</tr> +<tr> +<td>-V, --version</td> +<td></td> +<td>print version information and exit.</td> +</tr> +</tbody> +</table> +<h2 id="printpdf" tabindex="-1">PrintPDF</h2> +<p>This application will send a pdf document to the printer.</p> +<p class="alert alert-info">You must have the correct permissions to print the document!</p> +<p>Usage: <code>java -jar pdfbox-app-3.y.z.jar print [OPTIONS] -i=<infile></code></p> +<table> +<thead> +<tr> +<th>Command-Line Parameter</th> +<th>Default</th> +<th>Description</th> +</tr> +</thead> +<tbody> +<tr> +<td>-border</td> +<td></td> +<td>Print with border.</td> +</tr> +<tr> +<td>-dpi=<dpi></td> +<td></td> +<td>render into intermediate image with specific dpi and then print</td> +</tr> +<tr> +<td>-duplex=<duplex></td> +<td>DOCUMENT</td> +<td>print using duplex (SIMPLEX, DUPLEX, TUMBLE, DOCUMENT).</td> +</tr> +<tr> +<td>-h, --help</td> +<td></td> +<td>Show help message and exit.</td> +</tr> +<tr> +<td>-i, --input=<infile></td> +<td></td> +<td>the PDF file to print.</td> +</tr> +<tr> +<td>-mediaSize=<mediaSize></td> +<td></td> +<td>print using media size name.</td> +</tr> +<tr> +<td>-noColorOpt</td> +<td></td> +<td>disable color optimizations (useful when printing barcodes).</td> +</tr> +<tr> +<td>-orientation</td> +<td>AUTO</td> +<td>print using orientation (AUTO, LANDSCAPE, PORTRAIT).</td> +</tr> +<tr> +<td>-password=[<password>]</td> +<td></td> +<td>Password for the PDF.</td> +</tr> +<tr> +<td>-printerName=<printerName></td> +<td></td> +<td>print to specified printer.</td> +</tr> +<tr> +<td>-silentPrint</td> +<td></td> +<td>print without printer dialog box.</td> +</tr> +<tr> +<td>-tray=<tray></td> +<td></td> +<td>print using tray.</td> +</tr> +<tr> +<td>-V, --version</td> +<td></td> +<td>print version information and exit.</td> +</tr> +</tbody> +</table> +<h2 id="texttopdf" tabindex="-1">TextToPDF</h2> +<p>This application will create a PDF document from a text file.</p> +<p>Usage: <code>java -jar pdfbox-app-3.y.z.jar fromText [OPTIONS] -i=<infile> -o=<outfile></code></p> +<table> +<thead> +<tr> +<th>Command-Line Parameter</th> +<th>Default</th> +<th>Description</th> +</tr> +</thead> +<tbody> +<tr> +<td>-charset=<charset></td> +<td>UTF-8</td> +<td>the charset to use.</td> +</tr> +<tr> +<td>-fontSize=<fontSize></td> +<td>10</td> +<td>the size of the font to use.</td> +</tr> +<tr> +<td>-h, --help</td> +<td></td> +<td>Show help message and exit.</td> +</tr> +<tr> +<td>-i, --input=<infile></td> +<td></td> +<td>the text file to convert.</td> +</tr> +<tr> +<td>-landscape</td> +<td></td> +<td>set orientation to landscape.</td> +</tr> +<tr> +<td>-o, --output=<outfile></td> +<td></td> +<td>the generated PDF file.</td> +</tr> +<tr> +<td>-pageSize=<pageSize></td> +<td>LETTER</td> +<td>the page size to use (LETTER, LEGAL, A0, A1, A2, A3, A4, A5, A6).</td> +</tr> +<tr> +<td>-standardFont=<standardFont></td> +<td>Helvetica</td> +<td>The font to use for the text. Either this or -ttf should be specified but not both.</td> +</tr> +<tr> +<td>-ttf=<ttfFile></td> +<td></td> +<td>The TTF font to use for the text. Either this or -standardFont should be specified but not both.</td> +</tr> +<tr> +<td>-V, --version</td> +<td></td> +<td>print version information and exit.</td> +</tr> +</tbody> +</table> +<p>The following font names can be used for the parameter <code>standardFont</code>:</p> +<ul> +<li>Courier</li> +<li>Courier-Bold</li> +<li>Courier-Oblique</li> +<li>Courier-BoldOblique</li> +<li>Helvetica</li> +<li>Helvetica-Bold</li> +<li>Helvetica-Oblique</li> +<li>Helvetica-BoldOblique</li> +<li>Symbol</li> +<li>Times-Bold</li> +<li>Times-Roman</li> +<li>Times-Italic</li> +<li>Times-BoldItalic</li> +<li>ZapfDingbats</li> +</ul> +<h2 id="writedecodeddoc" tabindex="-1">WriteDecodedDoc</h2> +<p>An application to decompress PDF documents.</p> +<p>Usage: <code>java -jar pdfbox-app-3.y.z.jar decode [OPTIONS] <input-file> <output-file></code></p> +<table> +<thead> +<tr> +<th>Command-Line Parameter</th> +<th>Description</th> +</tr> +</thead> +<tbody> +<tr> +<td>input-file</td> +<td>the PDF document to decompress</td> +</tr> +<tr> +<td>output-file</td> +<td>the PDF file top save to</td> +</tr> +<tr> +<td>-h, --help</td> +<td>Show help message and exit.</td> +</tr> +<tr> +<td>-password=[<password>]</td> +<td>Password for the PDF.</td> +</tr> +<tr> +<td>-skipImages</td> +<td>don't uncompress images</td> +</tr> +<tr> +<td>-V, --version</td> +<td>print version information and exit.</td> +</tr> +</tbody> +</table> + + </section> + <aside> + + <h1>Table of Contents<a class="edit-link" href="https://github.com/apache/pdfbox-docs/edit/master/./content/3.0/commandline.md" title="Edit this page"> + <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M11.013 1.427a1.75 1.75 0 012.474 0l1.086 1.086a1.75 1.75 0 010 2.474l-8.61 8.61c-.21.21-.47.364-.756.445l-3.251.93a.75.75 0 01-.927-.928l.929-3.25a1.75 1.75 0 01.445-.758l8.61-8.61zm1.414 1.06a.25.25 0 00-.354 0L10.811 3.75l1.439 1.44 1.263-1.263a.25.25 0 000-.354l-1.086-1.086zM11.189 6.25L9.75 4.81l-6.286 6.287a.25.25 0 00-.064.108l-.558 1.953 1.953-.558a.249.249 0 00 [...] + </a></h1> + + <nav class="toc"> + <ol> + + <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> + </ol> + </nav> + + </aside> + </div> + + <footer class="footer"> + <div class="container"> + <div class="row"> + <div class="span3"> + <!-- nothing in here on purpose --> + </div> + <div class="span9"> + <p>Copyright © 2009–2023 <a href="https://www.apache.org/">The Apache Software Foundation</a>. Licensed under the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>. + <br>Apache PDFBox, PDFBox, Apache, the Apache feather logo and the Apache PDFBox project logos are trademarks of The Apache Software Foundation.</p> + </div> + </div> + </div> +</footer> + + +</body> + +</html> \ No newline at end of file diff --git a/content/3.0/dependencies.html b/content/3.0/dependencies.html new file mode 100644 index 00000000..3cc9788e --- /dev/null +++ b/content/3.0/dependencies.html @@ -0,0 +1,218 @@ +<!DOCTYPE html> +<html lang="en"> + +<!-- + + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE- 2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + +<head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta name="description" content="The Apache PDFBox™ library is an open source Java tool for working with PDF documents. This project allows creation of new PDF documents, manipulation of existing documents and the ability to extract content from documents. Apache PDFBox also includes several command-line utilities. Apache PDFBox is published under the Apache License v2.0."> + + <title>Apache PDFBox | Dependencies</title> + + <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet"> + <link href="/css/prism.css" rel="stylesheet"> + <link href="/css/styles.css" rel="stylesheet"> + + + + + + + +</head> + + +<body> + + <header class="main-header"> + <div class="main-header-logo"> + <a href="/" aria-label="Navigation to the PDFBox home page"> + <svg focusable="false" class="pdfbox-brand-toolbox" viewBox="0 0 744.09448819 1052.3622047" xmlns="http://www.w3.org/2000/svg" aria-labelledby="brandImageTitle brandImageDesc" role="img"> + <title id="brandImageTitle">PDFBox Brand Logo</title> + <desc id="brandImageDesc">The PDFBox logo showing a toolbox.</desc> + <g transform="matrix(1.25 0 0 -1.25 -317.14 1018.08)" clip-path="url(#clipPath3375)"> + <path d="M821.924 376.535L463.24 122.525l-203.83 76.86c23.89 6.02 46.87 15.197 68.335 27.29 60.063 33.835 105.686 88.46 128.282 153.59 2.634 4.66 8.11 6.92 13.265 5.47 4.667-1.31 8.01-5.41 8.353-10.247l-3.572-188.12 334.99 193.957c2.41 1 5.113 1.028 7.54.075 2.315-.907 4.21-2.64 5.32-4.865zm-1.307 97.91l.13-78.324c-.87-2.72-3.342-4.61-6.197-4.75-3.104-.14-5.924 1.8-6.893 4.75l1.29 79.54c.386 2.92 2.893 5.09 5.835 5.04 3.37-.04 6.022-2.89 5.835-6.25z"/> + <path d="M751.88 651.666c-.237.002-.48-.022-.723-.077l-363.512-25.15c-10.37-.73-19.583-6.76-24.588-15.87-6.943-12.64-4.677-28.26 5.864-37.72 2.85-2.56 6.22-4.49 8.97-7.16 2.19-2.12 3.93-4.65 5.12-7.45 23.7-26.86 30.3-64.76 17.08-98.05-4.75-11.96-11.97-22.77-21.2-31.73l-73.74 16.1 46.69 115.89c2.01 3.07.64 7.21-2.8 8.49-2.8 1.03-5.91-.34-7.03-3.1L286.49 448.8l-11.79 4.32c-2.097.28-4.21-.39-5.76-1.825-1.16-1.077-1.925-2.516-2.16-4.083l-11.53-189.68c1.66-1.83 4.03-2.85 6.5-2.798 2.533.0 [...] + <path d="M786.68 627.94c.393-18.97 2.614-37.734 6.564-56.05 3.873-17.958 9.463-35.75 19.087-51.71 3.54-5.854 7.58-11.385 12.08-16.53 1.07-1.608 1.71-3.462 1.86-5.386.14-1.842-.16-3.69-.9-5.385-54.19-15.56-108.32-31.34-162.39-47.35-54.2-16.05-108.33-32.33-162.39-48.85-.23 1.43.04 2.9.78 4.15 1.07 1.81 2.96 2.99 5.06 3.13l271.54 104.43c-4.43 19.56-7.17 39.46-8.19 59.49-.99 19.68-.32 39.4 2.02 58.97.81 4.06 4.63 6.79 8.74 6.24 2.88-.39 5.27-2.4 6.15-5.16z"/> + </g> +</svg> + + <svg focusable="false" class="pdfbox-brand-text" xmlns="http://www.w3.org/2000/svg" style="isolation:isolate" viewBox="0 0 109.81066666651577 30.943999999957384" aria-labelledby="brandTextTitle brandTextDesc" role="img"> + <title id="brandTextTitle">PDFBox brand text</title> + <desc id="brandTextDesc">PDFBox, the brand text.</desc> + <path d="M0 .31h6.528q1.792 0 3.157.47 1.366.468 2.475 1.663 1.11 1.194 1.536 2.816.427 1.57.427 4.3 0 2-.256 3.45-.214 1.41-.982 2.64-.896 1.492-2.39 2.345-1.492.81-3.924.81H4.36v11.87H0V.305zm4.352 14.42h2.09q1.323 0 2.05-.383.724-.384 1.065-1.024.342-.683.384-1.622.09-.93.09-2.09 0-1.06-.08-2-.04-.98-.38-1.66-.3-.72-.98-1.11-.68-.43-1.96-.43H4.36v10.32z" fill-rule="evenodd"/> + <path d="M17.333.31h6.443q3.712 0 5.675 2.09 1.97 2.048 1.97 5.76v14.208q0 4.267-2.09 6.315-2.05 2.005-5.93 2.005h-6.06V.308zm4.352 26.282h2.006q1.84 0 2.61-.896.77-.94.77-2.9V8.16q0-1.792-.72-2.773-.72-.982-2.64-.982H21.7v22.187z" fill-rule="evenodd"/> + <path d="M35.583.31h12.97v4.095h-8.618v9.216h7.51v4.1h-7.51v12.97h-4.352V.31z"/> + <path d="M51.417.31h6.357q2.09 0 3.54.64 1.495.64 2.433 1.706.94 1.067 1.323 2.475.427 1.37.427 2.86V9.1q0 1.236-.214 2.09-.17.853-.554 1.493-.39.64-.94 1.152-.56.47-1.28.896 1.53.73 2.26 2.18.72 1.41.72 3.8v1.71q0 4.01-1.97 6.15-1.92 2.13-6.19 2.13H51.4V.31zm4.352 26.026h1.87q1.32 0 2.05-.384.77-.384 1.15-1.067.38-.682.47-1.62.08-.94.08-2.05 0-1.15-.13-2.004-.13-.85-.56-1.4-.386-.6-1.11-.89-.727-.3-1.92-.3h-1.92v9.73zm0-13.568h1.96q2.17 0 2.9-1.067.77-1.1.77-3.2 0-2.04-.86-3.07-.81-1. [...] + <path d="M69.027 16.31q0-1.323.17-2.433.17-1.11.64-1.962.768-1.408 2.22-2.262 1.45-.853 3.455-.853t3.456.853q1.45.854 2.22 2.262.468.853.64 1.962.17 1.11.17 2.432v7.12q0 1.32-.17 2.43-.172 1.11-.64 1.96-.77 1.4-2.22 2.26-1.45.85-3.456.85-2.005 0-3.456-.86-1.45-.854-2.22-2.26-.468-.855-.64-1.964-.17-1.11-.17-2.43V16.3zm4.352 7.807q0 1.238.55 1.878.6.597 1.58.597.98 0 1.53-.597.59-.64.59-1.878v-8.49q0-1.238-.6-1.835-.557-.64-1.538-.64-.98 0-1.58.64-.553.597-.553 1.835v8.49z" fill-rule="e [...] + <path d="M88.316 19.637L83.24 9.057h4.607l2.688 6.143 2.688-6.144h4.608l-5.16 10.58 5.42 11.052h-4.61l-2.94-6.613-2.94 6.613h-4.61l5.34-11.05z"/> + <path d="M102.883 5.28h1.2q.784 0 1.168-.224.4-.24.4-.784 0-.464-.35-.672-.33-.224-.88-.224h-1.53V5.28zm-1.056-2.864h2.56q2.32 0 2.32 1.904 0 .48-.144.816-.128.336-.368.56-.24.224-.56.352-.304.112-.656.16l1.93 2.96h-1.28L103.7 6.24h-.817v2.928h-1.056V2.416zm6.832 3.376q0-.976-.37-1.84-.37-.864-.99-1.504-.63-.64-1.48-1.008-.85-.384-1.81-.384t-1.81.384q-.85.368-1.47 1.008t-1 1.504-.37 1.84q0 .976.364 1.84.37.864.992 1.504t1.47 1.024q.85.368 1.81.368.96 0 1.805-.368.85-.384 1.47-1.024.625 [...] +</svg> + + </a> + </div> + <nav class="wrapper"> + <input type="checkbox" id="menu-toggle"> + <label for="menu-toggle" class="label-toggle"></label> + <ul> + <li><a href="/blog">Blog</a></li> + </ul> + </nav> +</header> + + + + + <div class="container documentation"> + <nav class="accordion-menu" role="navigation"> + <h1>Documentation</h1> + <ul><li> + <a href="/3.0/migration.html" > + Migration + </a> + </li><li> + <a href="/3.0/getting-started.html" > + Getting Started + </a> + </li><li> + <a href="/3.0/dependencies.html" > + Dependencies + </a> + </li><li> + <a href="/3.0/commandline.html" > + Command-Line Tools + </a> + </li><li> + <a href="https://javadoc.io/doc/org.apache.pdfbox/pdfbox/3.0.0-alpha3/index.html" > + API Docs <small>via javadoc.io</small> + </a> + </li> + </ul> + </nav> + + <section> + <h1 id="dependencies" tabindex="-1">Dependencies</h1> +<h2 id="core-components" tabindex="-1">Core Components</h2> +<p class="alert alert-info">These components are needed during runtime, development and testing dependent on the details below.</p> +<p>The three PDFBox components are named <code>pdfbox</code>, <code>fontbox</code> and <code>xmpbox</code>. The Maven groupId of all PDFBox components is org.apache.pdfbox.</p> +<h3 id="minimum-requirements" tabindex="-1">Minimum Requirements</h3> +<p>PDFBox has the following basic dependencies:</p> +<ul> +<li>Java 8</li> +<li><a href="http://commons.apache.org/logging/">commons-logging</a></li> +</ul> +<p>Commons Logging is a generic wrapper around different logging frameworks, so you'll either need to also use a logging library like <a href="http://logging.apache.org/log4j/">log4j</a> +or let commons-logging fall back to the standard <a href="http://java.sun.com/j2se/1.4.2/docs/guide/util/logging/overview.html">java.util.logging API</a> +included in the Java platform.</p> +<p>For <strong>PDFBox Preflight tests only</strong> <a href="https://commons.apache.org/proper/commons-io/">commons-io 2.4</a> is needed.</p> +<h3 id="font-handling" tabindex="-1">Font Handling</h3> +<p>For font handling the fontbox component is needed.</p> +<h3 id="xmp-metadata" tabindex="-1">XMP Metadata</h3> +<p>To support XMP metadata the xmpbox component is needed.</p> +<h3 id="include-dependencies-using-maven" tabindex="-1">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> +<pre class="language-xml"><code class="language-xml"><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>dependency</span><span class="token punctuation">></span></span><br> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>groupId</span><span class="token punctuation">></span></span>org.apache.pdfbox<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>groupId</span>< [...] +<p>Set the version field to the latest stable PDFBox version.</p> +<h2 id="optional-components" tabindex="-1">Optional Components</h2> +<p>PDFBox does not ship with all features enabled. Third party components are necessary to get full support for certain functionality.</p> +<h3 id="jai-image-i%2Fo" tabindex="-1">JAI Image I/O</h3> +<p>PDF supports embedded image files, however support for some formats require third party libraries which are distributed under terms incompatible with the Apache 2.0 license:</p> +<ul> +<li>Reading <strong>JBIG2</strong> images: <a href="https://pdfbox.apache.org/download.cgi#JBIG2">JBIG2 ImageIO</a></li> +<li>Reading <strong>JPEG 2000 (JPX)</strong> images: <a href="https://java.net/projects/jai-imageio-core">JAI Image I/O Tools Core</a></li> +<li>Writing <strong>TIFF</strong> images requires <em>JAI Image I/O Tools Core</em> also.</li> +</ul> +<p>These libraries are optional and will be loaded if present on the classpath, otherwise support for these image formats will be disabled and a warning will be logged when an unsupported image is encountered.</p> +<p>Maven dependencies for these components can be found in <a href="https://svn.apache.org/viewvc/pdfbox/trunk/parent/pom.xml?view=markup">parent/pom.xml</a>. <strong>Change the scope of the components if needed</strong>. Please make sure that any third party licenses are suitable for your project.</p> +<p>To include the JBIG2 library the following part can be included in your project pom.xml:</p> +<pre class="language-xml"><code class="language-xml"><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>dependency</span><span class="token punctuation">></span></span><br> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>groupId</span><span class="token punctuation">></span></span>org.apache.pdfbox<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>groupId</span>< [...] +<p>To include the JAI capabilities the following part can be included in your project pom.xml:</p> +<pre class="language-xml"><code class="language-xml"><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>dependency</span><span class="token punctuation">></span></span><br> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>groupId</span><span class="token punctuation">></span></span>com.github.jai-imageio<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>groupId</s [...] +<p>For more reliable JPEG decoding the following part from the <a href="https://github.com/haraldk/TwelveMonkeys">TwelveMonkeys library</a> can be included in your project pom.xml:</p> +<pre class="language-xml"><code class="language-xml"><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>dependency</span><span class="token punctuation">></span></span><br> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>groupId</span><span class="token punctuation">></span></span>com.twelvemonkeys.imageio<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>groupId [...] +<h3 id="encryption-and-signing" tabindex="-1">Encryption and Signing</h3> +<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> +<pre class="language-xml"><code class="language-xml"><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>dependency</span><span class="token punctuation">></span></span><br> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>groupId</span><span class="token punctuation">></span></span>org.bouncycastle<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>groupId</span><s [...] +<p class="alert alert-info">It is always a good idea to check for a newer version of Bouncy Castle. If you are using a more recent java version you might adapt the <b>artifactId</b> as well.</p> + + </section> + <aside> + + <h1>Table of Contents<a class="edit-link" href="https://github.com/apache/pdfbox-docs/edit/master/./content/3.0/dependencies.md" title="Edit this page"> + <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M11.013 1.427a1.75 1.75 0 012.474 0l1.086 1.086a1.75 1.75 0 010 2.474l-8.61 8.61c-.21.21-.47.364-.756.445l-3.251.93a.75.75 0 01-.927-.928l.929-3.25a1.75 1.75 0 01.445-.758l8.61-8.61zm1.414 1.06a.25.25 0 00-.354 0L10.811 3.75l1.439 1.44 1.263-1.263a.25.25 0 000-.354l-1.086-1.086zM11.189 6.25L9.75 4.81l-6.286 6.287a.25.25 0 00-.064.108l-.558 1.953 1.953-.558a.249.249 0 00 [...] + </a></h1> + + <nav class="toc"> + <ol> + + <li><a href="#core-components">Core Components</a> + + <ol> + + <li><a href="#minimum-requirements">Minimum Requirements</a> + </li> + + <li><a href="#font-handling">Font Handling</a> + </li> + + <li><a href="#xmp-metadata">XMP Metadata</a> + </li> + + <li><a href="#include-dependencies-using-maven">Include Dependencies Using Maven</a> + </li> + </ol> + </li> + + <li><a href="#optional-components">Optional Components</a> + + <ol> + + <li><a href="#jai-image-i%2Fo">JAI Image I/O</a> + </li> + + <li><a href="#encryption-and-signing">Encryption and Signing</a> + </li> + </ol> + </li> + </ol> + </nav> + + </aside> + </div> + + <footer class="footer"> + <div class="container"> + <div class="row"> + <div class="span3"> + <!-- nothing in here on purpose --> + </div> + <div class="span9"> + <p>Copyright © 2009–2023 <a href="https://www.apache.org/">The Apache Software Foundation</a>. Licensed under the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>. + <br>Apache PDFBox, PDFBox, Apache, the Apache feather logo and the Apache PDFBox project logos are trademarks of The Apache Software Foundation.</p> + </div> + </div> + </div> +</footer> + + +</body> + +</html> \ No newline at end of file diff --git a/content/2.0/getting-started.html b/content/3.0/getting-started.html similarity index 91% copy from content/2.0/getting-started.html copy to content/3.0/getting-started.html index 50f5ff23..ce95ff5e 100644 --- a/content/2.0/getting-started.html +++ b/content/3.0/getting-started.html @@ -85,40 +85,23 @@ <nav class="accordion-menu" role="navigation"> <h1>Documentation</h1> <ul><li> - <a href="/2.0/migration.html" > + <a href="/3.0/migration.html" > Migration </a> </li><li> - <a href="/2.0/getting-started.html" > + <a href="/3.0/getting-started.html" > Getting Started </a> </li><li> - <a href="/2.0/examples.html" > - Examples - </a> - </li><li> - <a href="/2.0/dependencies.html" > + <a href="/3.0/dependencies.html" > Dependencies </a> - </li><li class="has-children"> - <input type="checkbox" checked> - <i></i> - <label>Cookbook</label> - <ul><li> - <a href="/2.0/cookbook/encryption.html" > - Encrypting a File - </a> - </li></ul> </li><li> - <a href="/2.0/commandline.html" > + <a href="/3.0/commandline.html" > Command-Line Tools </a> </li><li> - <a href="/2.0/faq.html" > - FAQ - </a> - </li><li> - <a href="https://javadoc.io/doc/org.apache.pdfbox/pdfbox/2.0.27/index.html" > + <a href="https://javadoc.io/doc/org.apache.pdfbox/pdfbox/3.0.0-alpha3/index.html" > API Docs <small>via javadoc.io</small> </a> </li> @@ -129,7 +112,7 @@ <h1 id="getting-started" tabindex="-1">Getting Started</h1> <h2 id="maven" tabindex="-1">Maven</h2> <p>To use the latest release you'll need to add the following dependency:</p> -<pre class="language-xml"><code class="language-xml"><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>dependency</span><span class="token punctuation">></span></span><br> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>groupId</span><span class="token punctuation">></span></span>org.apache.pdfbox<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>groupId</span><sp [...] +<pre class="language-xml"><code class="language-xml"><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>dependency</span><span class="token punctuation">></span></span><br> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>groupId</span><span class="token punctuation">></span></span>org.apache.pdfbox<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>groupId</span><sp [...] <h2 id="pdfbox-and-java-8" tabindex="-1">PDFBox and Java 8</h2> <p class="alert alert-warning">Important notice when using PDFBox with Java 8 before 1.8.0_191 or Java 9 before 9.0.4</p> <p>Due to the change of the java color management module towards "LittleCMS", users can experience slow performance in color operations. @@ -150,7 +133,7 @@ https://bugs.openjdk.java.net/browse/JDK-8041125</p> </section> <aside> - <h1>Table of Contents<a class="edit-link" href="https://github.com/apache/pdfbox-docs/edit/master/./content/2.0/getting-started.md" title="Edit this page"> + <h1>Table of Contents<a class="edit-link" href="https://github.com/apache/pdfbox-docs/edit/master/./content/3.0/getting-started.md" title="Edit this page"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M11.013 1.427a1.75 1.75 0 012.474 0l1.086 1.086a1.75 1.75 0 010 2.474l-8.61 8.61c-.21.21-.47.364-.756.445l-3.251.93a.75.75 0 01-.927-.928l.929-3.25a1.75 1.75 0 01.445-.758l8.61-8.61zm1.414 1.06a.25.25 0 00-.354 0L10.811 3.75l1.439 1.44 1.263-1.263a.25.25 0 000-.354l-1.086-1.086zM11.189 6.25L9.75 4.81l-6.286 6.287a.25.25 0 00-.064.108l-.558 1.953 1.953-.558a.249.249 0 00 [...] </a></h1> diff --git a/content/3.0/migration.html b/content/3.0/migration.html index cf5153aa..19595f52 100644 --- a/content/3.0/migration.html +++ b/content/3.0/migration.html @@ -88,6 +88,18 @@ <a href="/3.0/migration.html" > Migration </a> + </li><li> + <a href="/3.0/getting-started.html" > + Getting Started + </a> + </li><li> + <a href="/3.0/dependencies.html" > + Dependencies + </a> + </li><li> + <a href="/3.0/commandline.html" > + Command-Line Tools + </a> </li><li> <a href="https://javadoc.io/doc/org.apache.pdfbox/pdfbox/3.0.0-alpha3/index.html" > API Docs <small>via javadoc.io</small> diff --git a/content/blog/index.html b/content/blog/index.html index c60dc07d..0a844876 100644 --- a/content/blog/index.html +++ b/content/blog/index.html @@ -101,7 +101,10 @@ <a href="#">3.0</a> <ul> <li><a href="/3.0/migration.html">Migration Guide</a></li> + <li><a href="/3.0/getting-started.html">Getting Started</a></li> + <li><a href="/3.0/dependencies.html">Dependencies</a></li> <li><a href="https://javadoc.io/doc/org.apache.pdfbox/pdfbox/3.0.0/index.html">API Docs <small>via javadoc.io</small></a></li> + <li><a href="/3.0/commandline.html">Command-Line Tools</a></li> </ul> </li> <li class="sidebar-node" id="v2-0"> diff --git a/content/building.html b/content/building.html index 35df1a50..03dae94d 100644 --- a/content/building.html +++ b/content/building.html @@ -101,7 +101,10 @@ <a href="#">3.0</a> <ul> <li><a href="/3.0/migration.html">Migration Guide</a></li> + <li><a href="/3.0/getting-started.html">Getting Started</a></li> + <li><a href="/3.0/dependencies.html">Dependencies</a></li> <li><a href="https://javadoc.io/doc/org.apache.pdfbox/pdfbox/3.0.0/index.html">API Docs <small>via javadoc.io</small></a></li> + <li><a href="/3.0/commandline.html">Command-Line Tools</a></li> </ul> </li> <li class="sidebar-node" id="v2-0"> diff --git a/content/codingconventions.html b/content/codingconventions.html index 212308af..f79380d4 100644 --- a/content/codingconventions.html +++ b/content/codingconventions.html @@ -101,7 +101,10 @@ <a href="#">3.0</a> <ul> <li><a href="/3.0/migration.html">Migration Guide</a></li> + <li><a href="/3.0/getting-started.html">Getting Started</a></li> + <li><a href="/3.0/dependencies.html">Dependencies</a></li> <li><a href="https://javadoc.io/doc/org.apache.pdfbox/pdfbox/3.0.0/index.html">API Docs <small>via javadoc.io</small></a></li> + <li><a href="/3.0/commandline.html">Command-Line Tools</a></li> </ul> </li> <li class="sidebar-node" id="v2-0"> diff --git a/content/download.html b/content/download.html index 9a7c2452..cb6c1235 100644 --- a/content/download.html +++ b/content/download.html @@ -101,7 +101,10 @@ <a href="#">3.0</a> <ul> <li><a href="/3.0/migration.html">Migration Guide</a></li> + <li><a href="/3.0/getting-started.html">Getting Started</a></li> + <li><a href="/3.0/dependencies.html">Dependencies</a></li> <li><a href="https://javadoc.io/doc/org.apache.pdfbox/pdfbox/3.0.0/index.html">API Docs <small>via javadoc.io</small></a></li> + <li><a href="/3.0/commandline.html">Command-Line Tools</a></li> </ul> </li> <li class="sidebar-node" id="v2-0"> diff --git a/content/errors/403.html b/content/errors/403.html index efc5a07f..6a34dfce 100644 --- a/content/errors/403.html +++ b/content/errors/403.html @@ -101,7 +101,10 @@ <a href="#">3.0</a> <ul> <li><a href="/3.0/migration.html">Migration Guide</a></li> + <li><a href="/3.0/getting-started.html">Getting Started</a></li> + <li><a href="/3.0/dependencies.html">Dependencies</a></li> <li><a href="https://javadoc.io/doc/org.apache.pdfbox/pdfbox/3.0.0/index.html">API Docs <small>via javadoc.io</small></a></li> + <li><a href="/3.0/commandline.html">Command-Line Tools</a></li> </ul> </li> <li class="sidebar-node" id="v2-0"> diff --git a/content/errors/404.html b/content/errors/404.html index b8e26856..f9dbd5f2 100644 --- a/content/errors/404.html +++ b/content/errors/404.html @@ -101,7 +101,10 @@ <a href="#">3.0</a> <ul> <li><a href="/3.0/migration.html">Migration Guide</a></li> + <li><a href="/3.0/getting-started.html">Getting Started</a></li> + <li><a href="/3.0/dependencies.html">Dependencies</a></li> <li><a href="https://javadoc.io/doc/org.apache.pdfbox/pdfbox/3.0.0/index.html">API Docs <small>via javadoc.io</small></a></li> + <li><a href="/3.0/commandline.html">Command-Line Tools</a></li> </ul> </li> <li class="sidebar-node" id="v2-0"> diff --git a/content/ideas.html b/content/ideas.html index fa2c294a..e5e413fe 100644 --- a/content/ideas.html +++ b/content/ideas.html @@ -101,7 +101,10 @@ <a href="#">3.0</a> <ul> <li><a href="/3.0/migration.html">Migration Guide</a></li> + <li><a href="/3.0/getting-started.html">Getting Started</a></li> + <li><a href="/3.0/dependencies.html">Dependencies</a></li> <li><a href="https://javadoc.io/doc/org.apache.pdfbox/pdfbox/3.0.0/index.html">API Docs <small>via javadoc.io</small></a></li> + <li><a href="/3.0/commandline.html">Command-Line Tools</a></li> </ul> </li> <li class="sidebar-node" id="v2-0"> diff --git a/content/index.html b/content/index.html index c43519d0..7f1cd87a 100644 --- a/content/index.html +++ b/content/index.html @@ -101,7 +101,10 @@ <a href="#">3.0</a> <ul> <li><a href="/3.0/migration.html">Migration Guide</a></li> + <li><a href="/3.0/getting-started.html">Getting Started</a></li> + <li><a href="/3.0/dependencies.html">Dependencies</a></li> <li><a href="https://javadoc.io/doc/org.apache.pdfbox/pdfbox/3.0.0/index.html">API Docs <small>via javadoc.io</small></a></li> + <li><a href="/3.0/commandline.html">Command-Line Tools</a></li> </ul> </li> <li class="sidebar-node" id="v2-0"> diff --git a/content/mailinglists.html b/content/mailinglists.html index ac60976b..c92de817 100644 --- a/content/mailinglists.html +++ b/content/mailinglists.html @@ -101,7 +101,10 @@ <a href="#">3.0</a> <ul> <li><a href="/3.0/migration.html">Migration Guide</a></li> + <li><a href="/3.0/getting-started.html">Getting Started</a></li> + <li><a href="/3.0/dependencies.html">Dependencies</a></li> <li><a href="https://javadoc.io/doc/org.apache.pdfbox/pdfbox/3.0.0/index.html">API Docs <small>via javadoc.io</small></a></li> + <li><a href="/3.0/commandline.html">Command-Line Tools</a></li> </ul> </li> <li class="sidebar-node" id="v2-0"> diff --git a/content/references.html b/content/references.html index cce53a84..29830a7d 100644 --- a/content/references.html +++ b/content/references.html @@ -101,7 +101,10 @@ <a href="#">3.0</a> <ul> <li><a href="/3.0/migration.html">Migration Guide</a></li> + <li><a href="/3.0/getting-started.html">Getting Started</a></li> + <li><a href="/3.0/dependencies.html">Dependencies</a></li> <li><a href="https://javadoc.io/doc/org.apache.pdfbox/pdfbox/3.0.0/index.html">API Docs <small>via javadoc.io</small></a></li> + <li><a href="/3.0/commandline.html">Command-Line Tools</a></li> </ul> </li> <li class="sidebar-node" id="v2-0"> diff --git a/content/security.html b/content/security.html index f2dc7a80..47bec6b3 100644 --- a/content/security.html +++ b/content/security.html @@ -101,7 +101,10 @@ <a href="#">3.0</a> <ul> <li><a href="/3.0/migration.html">Migration Guide</a></li> + <li><a href="/3.0/getting-started.html">Getting Started</a></li> + <li><a href="/3.0/dependencies.html">Dependencies</a></li> <li><a href="https://javadoc.io/doc/org.apache.pdfbox/pdfbox/3.0.0/index.html">API Docs <small>via javadoc.io</small></a></li> + <li><a href="/3.0/commandline.html">Command-Line Tools</a></li> </ul> </li> <li class="sidebar-node" id="v2-0"> diff --git a/content/siteupdate.html b/content/siteupdate.html index 796f38c5..4e23b985 100644 --- a/content/siteupdate.html +++ b/content/siteupdate.html @@ -101,7 +101,10 @@ <a href="#">3.0</a> <ul> <li><a href="/3.0/migration.html">Migration Guide</a></li> + <li><a href="/3.0/getting-started.html">Getting Started</a></li> + <li><a href="/3.0/dependencies.html">Dependencies</a></li> <li><a href="https://javadoc.io/doc/org.apache.pdfbox/pdfbox/3.0.0/index.html">API Docs <small>via javadoc.io</small></a></li> + <li><a href="/3.0/commandline.html">Command-Line Tools</a></li> </ul> </li> <li class="sidebar-node" id="v2-0"> diff --git a/content/support.html b/content/support.html index 365a2f12..85c0153d 100644 --- a/content/support.html +++ b/content/support.html @@ -101,7 +101,10 @@ <a href="#">3.0</a> <ul> <li><a href="/3.0/migration.html">Migration Guide</a></li> + <li><a href="/3.0/getting-started.html">Getting Started</a></li> + <li><a href="/3.0/dependencies.html">Dependencies</a></li> <li><a href="https://javadoc.io/doc/org.apache.pdfbox/pdfbox/3.0.0/index.html">API Docs <small>via javadoc.io</small></a></li> + <li><a href="/3.0/commandline.html">Command-Line Tools</a></li> </ul> </li> <li class="sidebar-node" id="v2-0"> diff --git a/content/team.html b/content/team.html index ceae88a1..2b6a8968 100644 --- a/content/team.html +++ b/content/team.html @@ -101,7 +101,10 @@ <a href="#">3.0</a> <ul> <li><a href="/3.0/migration.html">Migration Guide</a></li> + <li><a href="/3.0/getting-started.html">Getting Started</a></li> + <li><a href="/3.0/dependencies.html">Dependencies</a></li> <li><a href="https://javadoc.io/doc/org.apache.pdfbox/pdfbox/3.0.0/index.html">API Docs <small>via javadoc.io</small></a></li> + <li><a href="/3.0/commandline.html">Command-Line Tools</a></li> </ul> </li> <li class="sidebar-node" id="v2-0">