You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by "Marx, Alexander" <al...@hbsolutions.de> on 2008/08/11 11:49:51 UTC

Possible to avoid page breaks between table rows with keep-together?

Hello FOP-Users,

 

I need some help with using keep-together correctly. I am using the
latest 0.95 release.

 

I have attached a sample purchase order document which has a number of
order lines with different kinds of additional information. The
requirement is: One order line should be kept together on one page
including all additional information.  If the order line does not fit on
the same page it is supposed to trigger a page break.

 

I have tried to set keep-together accordingly but if you look at the
output of the sample xml you'll find that there still is a page break
within the same order line


Can you point me in the right direction how it is possible to  achieve
the intended behaviour?

 

Regards,

Alexander

 


Re: Using a custom OTF font (was: Possible to avoid page breaks between table rows with keep-together?)

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Oh yeah, that's the one catch that is often found with OTF fonts: our
lack of support for the Compact Font Format (CFF). Probably not too
difficult to implement but so far nobody had enough of an itch to
do it. I guess that leaves you with two options:
1. Implement support for CFF in FOP.
2. Try to convert the font into a TrueType font with TrueType glyph data
instead of CFF glyph data. The first stop here is probably http://fontforge.sourceforge.net/

Sorry for not remembering that possibility earlier.

On 11.08.2008 21:41:58 Steffanina, Jeff wrote:
> 
> Sorry for the thread mix-up earlier.... I wasn't watching where I was
> clicking.
> 
> The original custom fonts had an extension of  .otf  I have used the
> same file names with both the .otf and .ttf extensions with the same
> result.
> 
> Can anyone suggest a way to get around the CFF issue below?
> 
> Aug 11, 2008 3:30:55 PM org.apache.fop.fonts.autodetect.FontInfoFinder
> find
> SEVERE: Unable to load font file:
> file:/YY/Java1.4/fop-0.95/fonts/GothamRounded-Bold.ttf. Reason: OpenType
> fonts with CFF data are not supported, yet
> Aug 11, 2008 3:30:55 PM org.apache.fop.fonts.autodetect.FontInfoFinder
> find
> SEVERE: Unable to load font file:
> file:/YY/Java1.4/fop-0.95/fonts/GothamRounded-Bookld.ttf. Reason:
> OpenType fonts with CFF data are not supported, yet
> Aug 11, 2008 3:30:56 PM org.apache.fop.fonts.autodetect.FontInfoFinder
> find
> SEVERE: Unable to load font file:
> file:/YY/JLS/Java1.4/fop-0.95/fonts/GothamRounded-Medium.ttf. Reason:
> OpenType fonts with CFF data are not supported, yet
> 
> If I send you the font file, can you try to load it?
> 
> 
> Jeff 
> 
> -----Original Message-----
> From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch] 
> Sent: Monday, August 11, 2008 10:15 AM
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: Using a custom OTF font (was: Possible to avoid page breaks
> between table rows with keep-together?)
> 
> Steffanina, please don't hijack threads or at least change the subject.
> Thanks.
> 
> If the font is well done, it should be working in FOP without change.
> You can treat it like a TrueType font. If it doesn't, please let us know
> what doesn't work. Documentation as on our website:
> http://xmlgraphics.apache.org/fop/0.95/fonts.html#basics
> 
> On 11.08.2008 16:06:35 Steffanina, Jeff wrote:
> > I am using fop-0.95 on RedHat Linux running Linux applications (100%).
> > My problem is that one division insists on using a custom font in the
> > .OTF format that was created by a typographical company and therefore
> > requires licensing.  This is not a problem.
> >  
> > What does the font vendor have to do to make the font work in the
> Linux
> > environmen using FOP (legally, of course) ?   Is it as simple as
> > converting the font to a .TTF?
> >  
> >  
> > I need a description of what would have to be done to send directly to
> > them.
> >  
> >  
> >  
> > 
> > Jeff 
> > 
> 
> 
> 
> 
> Jeremias Maerki
> 



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


RE: Using a custom OTF font (was: Possible to avoid page breaks between table rows with keep-together?)

Posted by "Steffanina, Jeff" <Je...@marriott.com>.
Sorry for the thread mix-up earlier.... I wasn't watching where I was
clicking.

The original custom fonts had an extension of  .otf  I have used the
same file names with both the .otf and .ttf extensions with the same
result.

Can anyone suggest a way to get around the CFF issue below?

Aug 11, 2008 3:30:55 PM org.apache.fop.fonts.autodetect.FontInfoFinder
find
SEVERE: Unable to load font file:
file:/YY/Java1.4/fop-0.95/fonts/GothamRounded-Bold.ttf. Reason: OpenType
fonts with CFF data are not supported, yet
Aug 11, 2008 3:30:55 PM org.apache.fop.fonts.autodetect.FontInfoFinder
find
SEVERE: Unable to load font file:
file:/YY/Java1.4/fop-0.95/fonts/GothamRounded-Bookld.ttf. Reason:
OpenType fonts with CFF data are not supported, yet
Aug 11, 2008 3:30:56 PM org.apache.fop.fonts.autodetect.FontInfoFinder
find
SEVERE: Unable to load font file:
file:/YY/JLS/Java1.4/fop-0.95/fonts/GothamRounded-Medium.ttf. Reason:
OpenType fonts with CFF data are not supported, yet

If I send you the font file, can you try to load it?


Jeff 

-----Original Message-----
From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch] 
Sent: Monday, August 11, 2008 10:15 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Using a custom OTF font (was: Possible to avoid page breaks
between table rows with keep-together?)

Steffanina, please don't hijack threads or at least change the subject.
Thanks.

If the font is well done, it should be working in FOP without change.
You can treat it like a TrueType font. If it doesn't, please let us know
what doesn't work. Documentation as on our website:
http://xmlgraphics.apache.org/fop/0.95/fonts.html#basics

On 11.08.2008 16:06:35 Steffanina, Jeff wrote:
> I am using fop-0.95 on RedHat Linux running Linux applications (100%).
> My problem is that one division insists on using a custom font in the
> .OTF format that was created by a typographical company and therefore
> requires licensing.  This is not a problem.
>  
> What does the font vendor have to do to make the font work in the
Linux
> environmen using FOP (legally, of course) ?   Is it as simple as
> converting the font to a .TTF?
>  
>  
> I need a description of what would have to be done to send directly to
> them.
>  
>  
>  
> 
> Jeff 
> 




Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Using a custom OTF font (was: Possible to avoid page breaks between table rows with keep-together?)

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Steffanina, please don't hijack threads or at least change the subject.
Thanks.

If the font is well done, it should be working in FOP without change.
You can treat it like a TrueType font. If it doesn't, please let us know
what doesn't work. Documentation as on our website:
http://xmlgraphics.apache.org/fop/0.95/fonts.html#basics

On 11.08.2008 16:06:35 Steffanina, Jeff wrote:
> I am using fop-0.95 on RedHat Linux running Linux applications (100%).
> My problem is that one division insists on using a custom font in the
> .OTF format that was created by a typographical company and therefore
> requires licensing.  This is not a problem.
>  
> What does the font vendor have to do to make the font work in the Linux
> environmen using FOP (legally, of course) ?   Is it as simple as
> converting the font to a .TTF?
>  
>  
> I need a description of what would have to be done to send directly to
> them.
>  
>  
>  
> 
> Jeff 
> 




Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


RE: Possible to avoid page breaks between table rows with keep-together?

Posted by "Steffanina, Jeff" <Je...@marriott.com>.
I am using fop-0.95 on RedHat Linux running Linux applications (100%).
My problem is that one division insists on using a custom font in the
.OTF format that was created by a typographical company and therefore
requires licensing.  This is not a problem.
 
What does the font vendor have to do to make the font work in the Linux
environmen using FOP (legally, of course) ?   Is it as simple as
converting the font to a .TTF?
 
 
I need a description of what would have to be done to send directly to
them.
 
 
 

Jeff 


RE: Possible to avoid page breaks between table rows with keep-together?

Posted by "Griffin,Sean" <SG...@CERNER.COM>.
Alexander,

It's hard to tell, but I'm assuming that the row that contains the text "There should not be a page break now" is supposed to stay on the same page as the rows containing the texts "With this line" and "And this line"?  If so, you could accomplish this a couple of different ways.  You could either use keep-with-next.within-page="always" or (keep-with-previous) on the rows that you want to keep together, or you could wrap all related rows inside a nested table with keep-together.within-page="always" on that table.

 

Realize that you're currently specifying keep-together.within-page on the individual rows, and as you can see, those rows are keeping together and not allowing a page break in the middle.  If you want a series of rows to keep-together than you have to wrap those rows inside a parent block where keep-together is specified on that block.  Or...use keep-with-next/previous.

 

The approach that works the best will likely be determined by the algorithm you use to create this FO.

 

Sean

 

From: Marx, Alexander [mailto:alexander.marx@hbsolutions.de] 
Sent: Monday, August 11, 2008 4:50 AM
To: fop-users@xmlgraphics.apache.org
Subject: Possible to avoid page breaks between table rows with keep-together?

 

Hello FOP-Users,

 

I need some help with using keep-together correctly. I am using the latest 0.95 release.

 

I have attached a sample purchase order document which has a number of order lines with different kinds of additional information. The requirement is: One order line should be kept together on one page including all additional information.  If the order line does not fit on the same page it is supposed to trigger a page break.

 

I have tried to set keep-together accordingly but if you look at the output of the sample xml you'll find that there still is a page break within the same order line


Can you point me in the right direction how it is possible to  achieve the intended behaviour?

 

Regards,

Alexander

 

----------------------------------------------------------------------
CONFIDENTIALITY NOTICE This message and any included attachments are from Cerner Corporation and are intended only for the addressee. The information contained in this message is confidential and may constitute inside or non-public information under international, federal, or state securities laws. Unauthorized forwarding, printing, copying, distribution, or use of such information is strictly prohibited and may be unlawful. If you are not the addressee, please promptly delete this message and notify the sender of the delivery error by e-mail or you may call Cerner's corporate offices in Kansas City, Missouri, U.S.A at (+1) (816)221-1024.

AW: Possible to avoid page breaks between table rows with keep-together?

Posted by "Marx, Alexander" <al...@hbsolutions.de>.
Thanks for the help, got it all working now by using keep-with-previous=always on the affected rows.

Regards,
Alexander

-----Ursprüngliche Nachricht-----
Von: Jeremias Maerki [mailto:dev@jeremias-maerki.ch] 
Gesendet: Montag, 11. August 2008 16:03
An: fop-users@xmlgraphics.apache.org
Betreff: Re: Possible to avoid page breaks between table rows with keep-together?

So you want to keep multiple table-rows together. You can do that by
using keep-with-next.within-page="always" if you have already specified
keep-together on the row. Essentially, with the keep-together on the
rows you make sure they can't be split and with the keep-with next, you
can glue individual table-rows together. HTH

On 11.08.2008 11:49:51 Marx, Alexander wrote:
> Hello FOP-Users,
>  
> I need some help with using keep-together correctly. I am using the
> latest 0.95 release.
>  
> I have attached a sample purchase order document which has a number of
> order lines with different kinds of additional information. The
> requirement is: One order line should be kept together on one page
> including all additional information.  If the order line does not fit on
> the same page it is supposed to trigger a page break.
>  
> I have tried to set keep-together accordingly but if you look at the
> output of the sample xml you'll find that there still is a page break
> within the same order line
> 
> Can you point me in the right direction how it is possible to  achieve
> the intended behaviour?
>  
> Regards,
> Alexander
>  


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Possible to avoid page breaks between table rows with keep-together?

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
So you want to keep multiple table-rows together. You can do that by
using keep-with-next.within-page="always" if you have already specified
keep-together on the row. Essentially, with the keep-together on the
rows you make sure they can't be split and with the keep-with next, you
can glue individual table-rows together. HTH

On 11.08.2008 11:49:51 Marx, Alexander wrote:
> Hello FOP-Users,
>  
> I need some help with using keep-together correctly. I am using the
> latest 0.95 release.
>  
> I have attached a sample purchase order document which has a number of
> order lines with different kinds of additional information. The
> requirement is: One order line should be kept together on one page
> including all additional information.  If the order line does not fit on
> the same page it is supposed to trigger a page break.
>  
> I have tried to set keep-together accordingly but if you look at the
> output of the sample xml you'll find that there still is a page break
> within the same order line
> 
> Can you point me in the right direction how it is possible to  achieve
> the intended behaviour?
>  
> Regards,
> Alexander
>  


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org