18. How Do I Save Memory if a Document Refers to Many or Very Large Image Files?

To reduce the memory consumption caused by converting documents referencing many or large images, you can set the processing preference "PROCESSING_PREFERENCES_SAVE_MEMORY_IMAGES":

pdfReactor.setProcessingPreferences(
    PDFreactor.PROCESSING_PREFERENCES_SAVE_MEMORY_IMAGES);

This setting will have an impact on the performance and should therefore only be used when necessary.