We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Extract pdf part with the low memory consumption

Requirement:

Huge PDF (+/- 100MB) must be previewed on the frontend immediately.

Problem description:
Our current implementation take the whole document and extract the pages from it.
1. getPagesFromDocument
2. delete pages before the limit
3. delete pages after the limit
4. create the doc from the rest.

Questions:
1. Is it possible to provide just few pages of the PDF (given by the limit and offset) without the need to load the whole doc into memory (when X users concurrently ask for the part of the document memory is exhausted)
2. Is it possible to solve requirement in a different way?

Hi Martin,


Thanks for contacting support.

In order to manipulate any existing PDF file, first its contents need to be loaded in Document instance. I am afraid without loading complete document, the file contents cannot be manipulated. We are sorry for this inconvenience.