Here is an idea for dynamically changing text size that might work (not
tested):
<fo:flow flow-name="xsl-region-body" font-family="Helvetica"
start-indent="1em" font-size="8pt">
<xsl:attribute name="font-size">
<xsl:choose>
<xsl:when test="string-length('the text you are writting') >
500">
6pt
</xsl:when>
<xsl:otherwise>
8pt
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
Hope this helps.
Luke
----- Original Message -----
From: "Gang Li" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, April 13, 2005 4:42 PM
Subject: Fitting the text content in ONE page
Hi,
I have a caveat page that is filled with dynamically generated text
contents. I am wondering is there any way that I can keep them in only
ONE page no matter how many of them? What I can think of is to reduce
the font-size so that it can fit into 1 page. But can I dynamically
change the font-size? Or is there any other way that I can reach this
goal?
Thanks a lot,
Gang
-----Original Message-----
From: Luke Shannon [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 13, 2005 10:37 AM
To: [email protected]
Subject: Re: image running off the page
I was thinking something similar to this myself. I do have the
dimensions of
each image in the XML document I'm processing.
I can do some calculations to determine if an image should go on the
next
page or not.
Thanks for the feedback,
Luke
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, April 13, 2005 11:24 AM
Subject: Re: image running off the page
> The only thought I've had on this subject is to add up the heights of
the
> images (with a fudge factor for padding - say 25%) and move images
that
> exceed the page height to the next page (perhaps by wrapping them in a
new
> block). So, if you're usable page height is nine inches, you'd end up
with
> something like this:
>
> <fo:block>
> <fo:external-graphic height="1">
> <fo:external-graphic height="2">
> <fo:external-graphic height="2">
> <fo:external-graphic height="2">
> </fo:block>
> <fo:block break-before="page">
> <!-- This one kicked the to next block because it was
> too big for what was left of the previous page -->
> <fo:external-graphic height="3">
> <fo:external-graphic height="1">
> <fo:external-graphic height="1">
> <!-- and so on -->
> </fo:block>
>
> That kind of thing is nasty to implement in XSL, but it might work.
Also,
> I have no idea of what other content you might be managing with the
> images, so this solution could rapidly become very complex. Still,
it's a
> thought. Maybe it'll trigger a better thought on your part.
>
> Jay Bryant
> Bryant Communication Services
> (presently consulting at Synergistic Solution Technologies)
>
>
>
>
> "Luke Shannon" <[EMAIL PROTECTED]>
> 04/13/2005 10:08 AM
> Please respond to
> [email protected]
>
>
> To
> <[email protected]>
> cc
>
> Subject
> Re: image running off the page
>
>
>
>
>
>
> Ok. I have created a legal option for clients creating PDF files with
long
> images. But one of them still doesn't fit. The images runs through the
> footer and off the page on legal size. I don't know what to do from
here.
>
> Any suggestions would be welcomed.
>
> Thanks,
>
> Luke
>
> ----- Original Message -----
> From: "The Web Maestro" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Tuesday, April 12, 2005 4:39 PM
> Subject: Re: image running off the page
>
>
> > On Apr 12, 2005, at 1:13 PM, Luke Shannon wrote:
> > > Hi Clay;
> > >
> > > I made the following changes:
> >
> > I would try making them the same:
> >
> > <fo:simple-page-master master-name="simple" page-height="11in"
> > page-width="8.5in" margin-top="2cm" margin-bottom="1cm"
> > margin-left="2cm"
> > margin-right="2cm">
> > <fo:region-body region-name="xsl-region-body" display-align="center"
> > margin-top="2.67cm" margin-bottom="2.5cm"/>
> > <fo:region-before region-name="xsl-region-before"
display-align="before"
> > extent="2.67cm"/>
> > <fo:region-after region-name="xsl-region-after" extent="2.5cm"/>
> > </fo:simple-page-master>
> >
> > Do you have any keeps? It could be that some sort of keep-together
> > attribute might be getting in the way.
> >
> > > Seems the image is still running off the page. Is there some way I
can
> > > detect if this will happen? I think I could leave to the users to
> > > recognize
> > > a group of images are too large for a page. They could have an
option
> > > to
> > > choose a legal size page. But this is a lot of work and my manager
may
> > > not
> > > like the idea. I would love to make the current system smart
enough to
> > > manage this.
> > >
> > > Luke
> >
> > I remember my previous boss always wanted the programmer to do the
> > work, and not the end user... :-)
> >
> > Web Maestro Clay
> > --
> > <[EMAIL PROTECTED]> - <http://homepage.mac.com/webmaestro/>
> > My religion is simple. My religion is kindness.
> > - HH The 14th Dalai Lama of Tibet
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail:
[EMAIL PROTECTED]
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]