0

Hi every one i am here to clarify my doubt it might be silly for most of them but i need it for my app.my question is while writing the below line CGPDFDocumentRef myDocumentRef= CGPDFDocumentCreateWithURL(pdfUrl); how much memory will it take like what ever the size of the pdf size or any other.Of course i am releasing the CGPDFDocumentRef using CGPDFDocumentRelease(myDocumentRef). Can any one please give an idea how much memory CGPDFDocumentRef can it use.Thanks in advance.

1 Answer 1

2

The file size has very little to do with how much memory CGPDFDocument consumes. The call to CGPDFDocumentCreateWithURL will actually allocate very little memory because it's just reading some metadata (title of the document, number of pages...).

You will see the memory usage increase when you actually do something with the document, like rendering a page, because then all the images, fonts, etc. have to be loaded from the file into memory. This does not however depend directly on the file size because the document (or just parts of it) might be compressed, some resources could be shared by multiple pages, etc.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.