This is an automated email from the ASF dual-hosted git repository.

tilman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pdfbox-docs.git


The following commit(s) were added to refs/heads/master by this push:
     new baa90c6b PDFBOX-5300: add mixed scratch file call
baa90c6b is described below

commit baa90c6b02c5446c21294550a1c3556c935b1f6a
Author: Tilman Hausherr <til...@apache.org>
AuthorDate: Wed May 7 10:07:42 2025 +0200

    PDFBOX-5300: add mixed scratch file call
---
 content/2.0/faq.md | 2 +-
 content/3.0/faq.md | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/content/2.0/faq.md b/content/2.0/faq.md
index 9b29f775..05f62bca 100644
--- a/content/2.0/faq.md
+++ b/content/2.0/faq.md
@@ -225,7 +225,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())`
+- use a scratch file by loading files with this code `PDDocument.load(file, 
MemoryUsageSetting.setupTempFileOnly())` or with `PDDocument.load(file, 
MemoryUsageSetting.setupMixed(...))`.
 - activate subsampling by calling ``setSubsamplingAllowed(true)`` on your 
``PDFRenderer`` object
 - 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
diff --git a/content/3.0/faq.md b/content/3.0/faq.md
index 1274e0d3..b9a6c44d 100644
--- a/content/3.0/faq.md
+++ b/content/3.0/faq.md
@@ -237,7 +237,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 `Loader.loadPDF(file, 
IOUtils.createTempFileOnlyStreamCache())`
+- use a scratch file by loading files with this code `Loader.loadPDF(file, 
IOUtils.createTempFileOnlyStreamCache())` or with `Loader.loadPDF(file, () -> 
new ScratchFile(MemoryUsageSetting.setupMixed(...)))`.
 - activate subsampling by calling ``setSubsamplingAllowed(true)`` on your 
``PDFRenderer`` object
 - 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

Reply via email to