pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msahy...@apache.org
Subject pdfbox-docs git commit: PDFBOX-3330: document usage of scratch file for OutOfMemoryError in Rendering section
Date Mon, 06 Mar 2017 17:56:51 GMT
Repository: pdfbox-docs
Updated Branches:
  refs/heads/master 1368ec83a -> fd24c0190


PDFBOX-3330: document usage of scratch file for OutOfMemoryError in Rendering section


Project: http://git-wip-us.apache.org/repos/asf/pdfbox-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/pdfbox-docs/commit/fd24c019
Tree: http://git-wip-us.apache.org/repos/asf/pdfbox-docs/tree/fd24c019
Diff: http://git-wip-us.apache.org/repos/asf/pdfbox-docs/diff/fd24c019

Branch: refs/heads/master
Commit: fd24c0190ac55cb66f64c56cc0a54e9aae1f5b71
Parents: 1368ec8
Author: Maruan Sahyoun <sahyoun@fileaffairs.de>
Authored: Mon Mar 6 18:56:41 2017 +0100
Committer: Maruan Sahyoun <sahyoun@fileaffairs.de>
Committed: Mon Mar 6 18:56:41 2017 +0100

----------------------------------------------------------------------
 content/2.0/faq.md | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/pdfbox-docs/blob/fd24c019/content/2.0/faq.md
----------------------------------------------------------------------
diff --git a/content/2.0/faq.md b/content/2.0/faq.md
index aac0f03..f14eadc 100644
--- a/content/2.0/faq.md
+++ b/content/2.0/faq.md
@@ -202,6 +202,7 @@ the word "Hello" is drawn.
 The memory footprint depends on the PDF itself and on the resolution you use for rendering.
Some possible options:
 
 - increase the `-Xmx` value when starting java
+- use a scratch file by loading files with this code `PDDocument.load(file, MemoryUsageSetting.setupTempFileOnly())`
 - be careful not to hold your images after rendering them, e.g. avoid putting all images
of a PDF into a `List`
 - don't forgot to close your `PDDocument` objects
 - decrease the scale when calling `PDFRenderer.renderImage()`, or the dpi value when calling
`PDFRenderer.renderImageWithDPI()`


Mime
View raw message