You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ms...@apache.org on 2026/08/04 16:02:33 UTC
(pdfbox-docs) branch asf-site updated: Site checkin for project Apache PDFBox Website
This is an automated email from the ASF dual-hosted git repository.
asf-gitbox-commits 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 b060b2e0 Site checkin for project Apache PDFBox Website
b060b2e0 is described below
commit b060b2e05af14819de45f4a9cea0deda76a5a5bf
Author: Maruan Sahyoun <sa...@fileaffairs.de>
AuthorDate: Tue Aug 4 18:02:30 2026 +0200
Site checkin for project Apache PDFBox Website
---
content/2.0/faq.html | 5 +++++
content/2.0/migration.html | 2 +-
content/3.0/faq.html | 19 ++++++++++++++++++-
content/4.0/migration.html | 5 +++++
content/codingconventions.html | 2 ++
content/security.html | 6 ++++--
6 files changed, 35 insertions(+), 4 deletions(-)
diff --git a/content/2.0/faq.html b/content/2.0/faq.html
index 16c57677..6b5edcd3 100644
--- a/content/2.0/faq.html
+++ b/content/2.0/faq.html
@@ -284,6 +284,8 @@ and related issues for sample files.</p>
PDFBox will then render into an image
and print that one. You should experiment with 300, 600 and 1200 dpi by trying it with
the command-line app.</p>
+<h3 id="what-to-do-if-annotations-aren't-displayed-properly%3F" tabindex="-1">What to do if annotations aren't displayed properly?</h3>
+<p>Try calling <code>PDAcroForm.refreshAppearances()</code> before rendering. This isn't done by default.</p>
<h2 id="pdf-signatures" tabindex="-1">PDF signatures</h2>
<p><a name="extradata"></a></p>
<h3 id="ioexception%3A-extra-data-detected-in-stream" tabindex="-1">IOException: Extra data detected in stream</h3>
@@ -389,6 +391,9 @@ into a <code>ByteArrayInputStream</code> before passing it to the <code>CMSSigne
<li><a href="#why-is-printing-so-slow-for-some-pdfs%3F">Why is printing so slow for some PDFs?</a>
</li>
+
+ <li><a href="#what-to-do-if-annotations-aren't-displayed-properly%3F">What to do if annotations aren't displayed properly?</a>
+ </li>
</ol>
</li>
diff --git a/content/2.0/migration.html b/content/2.0/migration.html
index 7850e95c..13fb68db 100644
--- a/content/2.0/migration.html
+++ b/content/2.0/migration.html
@@ -204,7 +204,7 @@ and so on. The <code>add</code> method now supports all the different type of re
<pre class="language-java"><code class="language-java"><span class="token keyword">for</span><span class="token punctuation">(</span><span class="token class-name">PDPage</span> page <span class="token operator">:</span> document<span class="token punctuation">.</span><span class="token function">getPages</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><br><span class="token punctuation">{</span><br> <span c [...]
<h3 id="pdf-rendering" tabindex="-1">PDF Rendering</h3>
<p>With PDFBox 2.0.0 <code>PDPage.convertToImage</code> and <code>PDFImageWriter</code> have been removed. Instead the new <code>PDFRenderer</code> class shall be used.</p>
-<pre class="language-java"><code class="language-java"><span class="token class-name">PDDocument</span> document <span class="token operator">=</span> <span class="token class-name">PDDocument</span><span class="token punctuation">.</span><span class="token function">load</span><span class="token punctuation">(</span><span class="token keyword">new</span> <span class="token class-name">File</span><span class="token punctuation">(</span>pdfFilename<span class="token punctuation">)</span>< [...]
+<pre class="language-java"><code class="language-java"><span class="token class-name">PDDocument</span> document <span class="token operator">=</span> <span class="token class-name">PDDocument</span><span class="token punctuation">.</span><span class="token function">load</span><span class="token punctuation">(</span><span class="token keyword">new</span> <span class="token class-name">File</span><span class="token punctuation">(</span>pdfFilename<span class="token punctuation">)</span>< [...]
<p><code>ImageIOUtil</code> has been moved into the <code>org.apache.pdfbox.tools.imageio</code> package. This is in the <code>pdfbox-tools</code> download. If you are using maven, the <code>artifactId</code> has the same name.</p>
<p class="alert alert-warning">Important notice when using PDFBox with Java 8
</p>
diff --git a/content/3.0/faq.html b/content/3.0/faq.html
index 768dfe20..4cd76c0c 100644
--- a/content/3.0/faq.html
+++ b/content/3.0/faq.html
@@ -156,7 +156,19 @@ For example, the Mangal font is meant to be a Devangari font, but PDFBox will ch
because that one is also claimed to be supported and is checked first.
Since 3.0.3 it is possible to deactivate the feature by calling <code>TrueTypeFont.setEnableGsub(false)</code>.
The features may be incomplete because we do not yet support all GSUB table formats,
-and we don't support GPOS at all. Text extraction may be incorrect.</p>
+and we don't support GPOS at all. Text extraction may be incorrect or incomplete.</p>
+<p>Starting with 3.0.9 there is a more advanced solution that uses AWT (and HarfBuzz under the hood),
+and also supports kerning and optional latin ligatures. (Mandatory ligatures are always done)
+It requires JDK9 and higher (it will not fail with JDK8, but it will look bad except for the DIN 91379 characters).
+To use it, include the <code>pdfbox-layout-awt</code> artifact.
+To understand the usage, look at the source code of the <code>GlyphLayoutHelloWorldAWT.java</code> example.
+We tested the feature with Indian scripts, Thai and Arabic.
+Text extraction may be incorrect or incomplete.</p>
+<p>Another alternative is the new <code>pdfbox-layout-fop</code> artifact which is based on <a href="https://xmlgraphics.apache.org/fop/">Apache FOP</a>.
+It supports only DIN 91379 characters, some ligatures and arabic characters, but not
+complex scripts like in Indian languages. It is an alternative if one wants to avoid AWT but
+needs DIN 91379.
+To understand the usage, look at the source code of the <code>GlyphLayoutHelloWorldFOP.java</code> example.</p>
<h3 id="what-fonts-do-i-need-on-my-system%3F" tabindex="-1">What fonts do I need on my system?</h3>
<p>Windows or Mac usually have the minimum fonts needed. You do need fonts that aren't embedded in PDFs
if these fonts are outside of the "Standard 14 fonts" set, and any specific fonts that you want
@@ -281,6 +293,8 @@ and related issues for sample files.</p>
PDFBox will then render into an image
and print that one. You should experiment with 300, 600 and 1200 dpi by trying it with
the command-line app.</p>
+<h3 id="what-to-do-if-annotations-aren't-displayed-properly%3F" tabindex="-1">What to do if annotations aren't displayed properly?</h3>
+<p>Try calling <code>PDAcroForm.refreshAppearances()</code> before rendering. This isn't done by default.</p>
<h2 id="pdf-signatures" tabindex="-1">PDF signatures</h2>
<p><a name="extradata"></a></p>
<h3 id="ioexception%3A-extra-data-detected-in-stream" tabindex="-1">IOException: Extra data detected in stream</h3>
@@ -389,6 +403,9 @@ into a <code>ByteArrayInputStream</code> before passing it to the <code>CMSSigne
<li><a href="#why-is-printing-so-slow-for-some-pdfs%3F">Why is printing so slow for some PDFs?</a>
</li>
+
+ <li><a href="#what-to-do-if-annotations-aren't-displayed-properly%3F">What to do if annotations aren't displayed properly?</a>
+ </li>
</ol>
</li>
diff --git a/content/4.0/migration.html b/content/4.0/migration.html
index c0f83fdc..acc53f18 100644
--- a/content/4.0/migration.html
+++ b/content/4.0/migration.html
@@ -142,6 +142,8 @@ was stream lined to fit their needs. But VeraPDF is still using the PDFBox parse
<h3 id="icosvisitor-derived-classes" tabindex="-1">ICOSVisitor derived classes</h3>
<p>If you have implemented your own <code>ICOSVisitor</code> class, you'll have to implement the new <code>visitFromObject</code> method.
The default implementation found in 3.0 has been moved to the <code>COSWriter</code> class.</p>
+<h3 id="signing" tabindex="-1">Signing</h3>
+<p><code>PDVisibleSigBuilder.appendRawCommands()</code> has been renamed to <code>writeRawCommands()</code> and gets a <code>PDStream</code> instead of an <code>OutputStream</code> as first parameter.</p>
<h3 id="deprecations" tabindex="-1">Deprecations</h3>
<p>In the PDIndexed class, the no parameter constructor and two methods were removed. Let us know if you need them.</p>
@@ -177,6 +179,9 @@ The default implementation found in 3.0 has been moved to the <code>COSWriter</c
<li><a href="#icosvisitor-derived-classes">ICOSVisitor derived classes</a>
</li>
+ <li><a href="#signing">Signing</a>
+ </li>
+
<li><a href="#deprecations">Deprecations</a>
</li>
</ol>
diff --git a/content/codingconventions.html b/content/codingconventions.html
index 0c944628..fab93cb3 100644
--- a/content/codingconventions.html
+++ b/content/codingconventions.html
@@ -286,6 +286,8 @@ Methods</p>
<p>Avoid unnecesary abstraction. While you're encouraged to avoid brittle designs, it's unlikey that an API designed for "future use" will have the correct API without any code which actually uses it.</p>
</li>
</ul>
+<h3 id="ai" tabindex="-1">AI</h3>
+<p>If you're using AI to contribute code, read the <a href="https://www.apache.org/legal/generative-tooling.html">ASF Generative Tooling Guidance</a> first.</p>
<h3 id="example" tabindex="-1">Example</h3>
<p>Here's an example of PDFBox's formatting style:</p>
<pre class="language-java"><code class="language-java"><span class="token keyword">public</span> <span class="token keyword">class</span> <span class="token class-name">Foo</span> <span class="token keyword">extends</span> <span class="token class-name">Bar</span><br><span class="token punctuation">{</span><br> <span class="token keyword">public</span> <span class="token keyword">static</span> <span class="token keyword">void</span> <span class="token function">main</span><span class= [...]
diff --git a/content/security.html b/content/security.html
index 73973c9a..8265c17b 100644
--- a/content/security.html
+++ b/content/security.html
@@ -159,8 +159,10 @@
<p>Processing untrusted PDFs is only supported to a point: malformed PDFs
will not cause remote code execution or other privilege escalation
problems. However, processing them may cause unchecked exceptions
-such as <code>StackOverflowError</code> or <code>NullPointerException</code>, or even use
-unexpected amounts of memory or cpu usage, including exhaustion of these.</p>
+such as <code>StackOverflowError</code> or <code>NullPointerException</code>, infinite loops, or even use
+unexpected amounts of memory or cpu usage, including exhaustion of these.
+See also our <a href="https://github.com/apache/pdfbox/security/policy">Security Scan Guidance</a>
+for security scanners and vulnerability researchers.</p>
<h2 id="reporting-security-issues" tabindex="-1">Reporting security issues</h2>
<p>The Apache Software Foundation takes a very active stance in eliminating and disclosing security problems against its products.</p>
<p>We strongly encourage folks to report such problems to our private security mailing list first, before disclosing them in a public forum.</p>