Loading ...
Sorry, an error occurred while loading the content.
 

Re: [XSL-FO] Fit text on one page

Expand Messages
  • W. Eliot Kimber
    ... There is no such facility in XSL-FO. I believe that Antenna House provide a squeeze to fit extension for overflow that might work--if your document needs
    Message 1 of 6 , Dec 2, 2004
      Phillip Cruz wrote:

      > Thanks everyone for the tips but I was wondering if there was a way to have
      > maybe a variable font size based on the length of the document.
      >
      > For example, if the document was 12pt and fit on one page then nothing
      > happens. If it is longer than one page, the font size will change to the
      > smallest size font it takes in order to reduce it to only one page. Hope
      > that makes sense!

      There is no such facility in XSL-FO. I believe that Antenna House
      provide a "squeeze to fit" extension for overflow that might work--if
      your document needs to be exactly one page long then you can put the
      content in a block-container with explicit block-progression-dimension
      and then use this overflow extension to make it fit.

      Another option is to use a two-pass process--generate the FO instance,
      format the document, if it's longer than one page, have your processor
      change some value or set of value, regenerate, etc. This can be done in
      Java without too much trouble using any of the major FO implementations
      as they all provide appropriate Java APIs.

      Cheers,

      Eliot
      --
      W. Eliot Kimber
      Professional Services
      Innodata Isogen
      9390 Research Blvd, #410
      Austin, TX 78759
      (512) 372-8122

      eliot@...
      www.innodata-isogen.com
    Your message has been successfully submitted and would be delivered to recipients shortly.