Re: rendering PDF on iPad's
Re: rendering PDF on iPad's
- Subject: Re: rendering PDF on iPad's
- From: Gustavo Pizano <email@hidden>
- Date: Wed, 19 May 2010 15:08:06 +0200
Rafael hi
Thanks for the info,, I will be testing the behavior with some pdfs and see whats better, to keep the CGPDFDocumentRef and destroy it when closing the pdf.. or open-close each time I change.. I guess I must decided what I want speed vs memory usage.
....
G,
On 19.5.2010, at 15:02, Rafael Cerioli wrote:
> Hi Gustavo,
>
> When you draw a CGPDFPageRef into a graphic context, Quartz will hold images inside the PDF page in a sort of cache (at least, it seems with Instrument Object Alloc). You can only empty that cache by destroying the CGPDFDocumentRef.
>
> However, if you do not destroy your CGPDFDocumentRef between two consecutive renderings, you will gain speed.
> I suggest that you test what best fits you. It depends on the rendering speed you need, and the size of the images in your PDF.
> And don't forget to use instruments.
>
>
> Le 19 mai 2010 à 07:32, Gustavo Pizano a écrit :
>
>> Laurent hi.
>> About your warning.
>>
>> SO If I have a pdf of many many pages, I shall just open de CGPDFDocument, then get the required page using CGPDFDocumetnGetPage(), dra the page then release the CGPDDocument?.. and when swapping pages just release the current page, open document again get next page and render?... I don't like this opening and closing CGPDFDocument... but shall it be like this? that only I actually load into memory the page Im drawing using the CGContextDrawPDFPage?
>>
>> G.
>>
>>
>> On 19.5.2010, at 12:11, Laurent Cerveau wrote:
>>
>>> Gustavo
>>>
>>> You can use the CGPDF API. However be careful on memory usage (in particular keeping the CGPDFDocument open all the time could lead to some memory issues that could be workarounded by closing and reopening it)
>>>
>>> Regards
>>>
>>> laurent
>>>
>>>
>>> On Wednesday, May 19, 2010, at 12:07PM, "Gustavo Pizano" <email@hidden> wrote:
>>>> Hello all.
>>>>
>>>> I would want to know if I can render pdf into iPad using quartz, or I have to use UIWebView... or whats the way to achieve this?
>>>>
>>>>
>>>> Any headlights are appreciate it.
>>>>
>>>> thanks
>>>>
>>>> Gustavo
>>>>
>>>> _______________________________________________
>>>>
>>>> Cocoa-dev mailing list (email@hidden)
>>>>
>>>> Please do not post admin requests or moderator comments to the list.
>>>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>>>>
>>>> Help/Unsubscribe/Update your Subscription:
>>>>
>>>> This email sent to email@hidden
>>>>
>>>>
>>
>> _______________________________________________
>>
>> Cocoa-dev mailing list (email@hidden)
>>
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>>
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden