IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Topic Options
#30563 - 12/01/09 01:32 PM Copy Fit
skwarek Offline
Junior Member

Registered: 11/26/09
Posts: 1
Is there a way to do a copy fit on address block in PlanetPress 7 like you can do it in Print Shop Mail? Any way or a workaround would be useful. I'm just starting to learn PlanetPress so be gental smile

Thanks

Top
#30564 - 12/11/09 05:31 PM Re: Copy Fit
JonS Offline
Junior Member

Registered: 12/11/09
Posts: 7
Loc: St. Louis, MO
If I understand you correctly, you are trying to set up a "boundry" where if text is displayed longer than say 2.5 inches then you want the font size to reduce until it fits.

If that is the case, here is what I use...
setstyle(&Style3)

define(&data, string,trim(@(30,1,100)))
define(&pcnt,integer,10)
define(&min,integer,6)
define(&lngth,measure,2.68)
define(&final,measure,6)
define(&sw,measure,stringwidth(&data))

for(&pcnt, 10, -1, &min)
setstyleext(&Style3,inttofloat(&pcnt),-1,-1,-1)
set(&sw,stringwidth(&data))
if((&sw < &lngth) and (&final = 6))
set(&final,inttofloat(&pcnt))
exit()
endif()
endfor()


setstyleext(&Style3,&final,-1,-1,-1)
show(&data)

---------------------------------------


Here is a quick run down.
&data is the line of text you are trying to output.
&pcnt is the font size you start at. (the for loop will then reduce this size by 1 until it fits.)
&min is the stopping point for the for loop.
&lngth is the length in inches of your boundry.
&final is the fail safe font size that you won't reduce below.

Top