Link
Skip to main content

Why are images missing from the PDF?

Images for the PDF page need to be stored in memory so the larger the image the more memory is required. In some files, an image that appears small on the page may actually be a much larger image that is then scaled to fit an area.

Whilst the final scaled image may be small that large image must first be loaded in order to be scaled. This can result in an OutOfMemoryError should the image require more than is currently available.

However, we do not throw these exceptions as we may be able to correctly display the rest of the content of the pages.

We do log these events when they arise which can be access to handle this occurrence.

We also have the option to add a LogScanner that will check the messages logged and can perform any action your specified. This would allow you to handle these or any events however you wish.

An example of how to handle OutOfMemoryErrors can be found here.


Get started with JPedal in 3 steps

  1. Fill in the form to download the trial jar →
  2. Copy the code snippets as instructed on the next page
  3. Build your solution using our docs

Learn more about JPedal

Start Your Free Trial


Customer Downloads

Select Download