Asher,
I took a *very* quick look at your PDFText code and think I may see some
potential problems.
I don't know PDF's handle word and character spacing, but if I'm not mistaken
your Stringwidth code won't work properly if you have multiple consecutive
spaces. If I understand your code, the theoretical null substrings between two
spaces would be counted as words. Is that right?
Also spaces are countes both for adding extra charcterspacing and word spacing.
Don't know if that is how PDF's do it either.
Also IIRC if you use :
p = newPicture(1, 1, 1)
on OSX stringwitdhs will be measured using quickdraw calls instead of Core
Graphics (Someone at RS: Is that right?) which supports fractional widths so I
use:
p = newPicture(1, 1, 32)
Also in line-wapping one may find text with no word breaks within the specified
length.
In that case one needs to break in the middle of a word. I prefer that lines
not be less than half their max width so in that case if there are no breaks
before half the line width I break in the middle of a word close to the max
length (one could insert a hyphen if desired)
- karen
> I've update PDF Classes to version 1.2.0.
>
> The main change is that PDFText and PDFStyledText have a width
> property, for automatically wrapping text (!!!).
> I also changed the meaning of the PDFText's LineSpacing property (see
> the documentation).
> The documentation now displays newly added stuff in green and changed
> stuff in brownish-red, making it easy to find.
>
> Asher Dunn
> --------------------------------------------------------
> President and Head Developer of Fireye Software
> <http://www.fireyesoftware.com/>
>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://support.realsoftware.com/listmanager/>
>
> Search the archives of this list here:
> <http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|