Repository: pdfbox-docs
Updated Branches:
  refs/heads/asf-site 8dccbb57f -> 11aef9083


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

Branch: refs/heads/asf-site
Commit: 11aef9083ec5d0e4428aad2c13465b1894bbd2bc
Parents: 8dccbb5
Author: Maruan Sahyoun <[email protected]>
Authored: Sun Feb 26 21:38:38 2017 +0100
Committer: Maruan Sahyoun <[email protected]>
Committed: Sun Feb 26 21:38:38 2017 +0100

----------------------------------------------------------------------
 content/2.0/faq.html | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/11aef908/content/2.0/faq.html
----------------------------------------------------------------------
diff --git a/content/2.0/faq.html b/content/2.0/faq.html
index 3ede810..279f874 100644
--- a/content/2.0/faq.html
+++ b/content/2.0/faq.html
@@ -167,6 +167,7 @@
 <h3 id="pdf-rendering">PDF Rendering</h3>
 
 <ul>
+  <li><a href="#outofmemoryrrror">I’m getting an OutOfMemoryError. What can 
I do?</a></li>
   <li><a href="#dropshadow">A drop shadow is missing or at the wrong position 
when rendering a page</a></li>
   <li><a href="#textantialias">Why are some texts in poor quality and not 
antialiased?</a></li>
 </ul>
@@ -318,6 +319,20 @@ the word “Hello” is drawn.</li>
 
 <h2 id="pdf-rendering-1">PDF rendering</h2>
 
+<p><a name="outofmemoryrrror"></a></p>
+
+<h3 id="im-getting-an-outofmemoryerror-what-can-i-do">I’m getting an 
OutOfMemoryError. What can I do?</h3>
+
+<p>The memory footprint depends on the PDF itself and on the resolution you 
use for rendering. Some possible options:</p>
+
+<ul>
+  <li>increase the <code class="highlighter-rouge">-Xmx</code> value when 
starting java</li>
+  <li>be careful not to hold your images after rendering them, e.g. avoid 
putting all images of a PDF into a <code 
class="highlighter-rouge">List</code></li>
+  <li>don’t forgot to close your <code 
class="highlighter-rouge">PDDocument</code> objects</li>
+  <li>decrease the scale when calling <code 
class="highlighter-rouge">PDFRenderer.renderImage()</code>, or the dpi value 
when calling <code 
class="highlighter-rouge">PDFRenderer.renderImageWithDPI()</code></li>
+  <li>disable the cache for <code 
class="highlighter-rouge">PDImageXObject</code> objects by calling <code 
class="highlighter-rouge">PDDocument.setResourceCache()</code> with a cache 
object that is derived from <code 
class="highlighter-rouge">DefaultResourceCache</code> and whose call <code 
class="highlighter-rouge">public void put(COSObject indirect, PDXObject 
xobject)</code> does nothing. Be aware that this will slow down rendering for 
PDF files that have an identical image in several pages (e.g. a company logo or 
a background). More about this can be read in <a 
href="https://issues.apache.org/jira/browse/PDFBOX-3700";>PDFBOX-3700</a>.</li>
+</ul>
+
 <p><a name="dropshadow"></a></p>
 
 <h3 
id="a-drop-shadow-is-missing-or-at-the-wrong-position-when-rendering-a-page">A 
drop shadow is missing or at the wrong position when rendering a page</h3>

Reply via email to