pdf-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pdf-devel] Request for a new Text module method: pdf_text_get_print


From: gerel
Subject: Re: [pdf-devel] Request for a new Text module method: pdf_text_get_printable ()
Date: Wed, 14 Apr 2010 09:43:54 -0300

 > From: Aleksander Morgado <address@hidden>
 > Date: Wed, 14 Apr 2010 14:33:24 +0200
 > 
 > 
 > >  > * Initially, the printable string is not allocated.
 > >  > * The first time this pdf_text_get_printable() method is called in a
 > >  > given pdf_text_t, it will internally setup the proper string contents to
 > >  > be returned.
 > >  > * The following times this method is called, and IF the pdf_text_t
 > >  > contents have not been modified, the same internal string is returned.
 > >  > * Whenever the contents of the pdf_text_t are modified, the internal
 > >  > buffer should be freed, so that any new call to pdf_text_get_printable()
 > >  > will re-create the printable string again with the proper contents.
 > >  > 
 > > 
 > > Hey Aleks,
 > > 
 > > We shouldn't forget about multi-threading in that case, right ?
 > > 
 > 
 > Not really. Note that the internal buffer will not be common to all
 > pdf_text_t objects, but a different internal buffer in each pdf_text_t
 > (just as the standard internal buffer containing the UTF-32HE encoded
 > string). So, if the same object is to be used by different threads, then
 > the app using the object should provide proper sync mechanisms to access
 > the object.
 > 

I understand, that's a good point. :-)

cheers,

-gerel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]