Re: Re: RTF, nested tables, context enhancement - status

2006-05-23 Thread b . ohnsorg

- original Nachricht 

Betreff: Re: RTF, nested tables, context enhancement - status
Gesendet: Mo 22 Mai 2006 22:30:07 CEST
Von: Jeremias Maerki[EMAIL PROTECTED]

 page-number-citation and page numbering: Both work to at least a certain
 degree. Can you elaborate on the problems you're seeing?
RTF does not know any «citation», so you need to write a character '2', if you 
want a link to display a page information refering to page '2'. For example an 
index at the end of the document does not know, which page explains «Barcode» 
and all links will show a question mark.

I thought about that last night (while cruising through the PDF-renderer to 
compare my table width «guessing» with the already implemented one) and draw 
the following conclusion:

Fact 1: RTF knows page breaks
Fact 2: RTF is page-oriented
Fact 3: RTF aligns elements absolute
Fact 4: RTF does not know anything about the document's structuring

Conclusion: RTF differs not that much from PDF-rendering (only written tokens 
are a bit different)
- Use the PDF-layout management system and add a RTF-writer. So RTF would look 
exactly like all PDFs. And there's only a slight difference from 
Office-generated RTFs: page breaks after every page.

 
 What's exactly the problem with graphics? We've got pretty good support
 for many cases, even SVG now.
I was only talking about the current RTF export. AFAIK GIFs are not rendered 
(there was an annoying exception string inside the document).

 GIF: The LZW patents are expired but still it's a good idea to forget
 GIF. The legal side is still less than clear.
But PDF «understands» GIFs, so I can use them. Should be the same with RTF, and 
the only thing I'll do is reading them and transform into a RTF-compatible 
format...if it's not legal I won't do this...

 RTF does support referenced images.
So there ought to be a switch (render to the document, use references)

 Over all, your post seems to address topics which, as far as I know, are
 mostly solved, so I'm not really sure what you're after. Maybe if you'd
 show the problems you're trying to address with examples
I only wanted to check any progress, maybe I forgot some important fact or any 
discussion. But the referencing of page-number-citation is one problem (we 
already discussed this in February), nesting tables, indenting...everything 
which needs structures inside structures (a block inside a block, a table 
inside a block, a block inside a table...)

 Anyway, we're looking forward to any patches against FOP SVN Trunk you
 might have. At any rate, you'd have problems committing anything to the
 repository without write access. That privilege will need to be earned
 first. ;-)
I know, therefore the review-strategy and «restructuring» the RTF-renderer will 
break it for a while (compiles, but does not produce any usable document). By 
now it's just transforming FOP-events to RTF-tags and I ran into problems which 
were solved with the new FOP-code (more effective memory usage) but seemed to 
be necessary (e.g. a table's width can only be determined if all columns were 
parsed, therefore you need to save previous column objects and by nesting 
tables it gets quite heavy [tried to experiment a bit with auto-table-layout, 
so you need all the rows, too])





--
Verlieben Sie sich mit Deutschlands größter Partneragentur
für langfristige Beziehungen. Machen Sie den ersten Schritt.
www.freenet.parship.de/?source=webmailfooter


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Metric Files

2006-05-23 Thread tblhh
Hi @ all,

I would like to have some theoretical background knowledge about metric files. 
Does anyone can tell me a bit about the build up or some links where all that 
pair kpx2=182 kern=-78/ ... and so on is explained? 

Thanks a lot and have a nice day

TBL


-- 


Bis zu 70% Ihrer Onlinekosten sparen: GMX SmartSurfer!
  Kostenlos downloaden: http://www.gmx.net/de/go/smartsurfer


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Problems with image scaling

2006-05-23 Thread Ståle Undheim
I have done a little search, and found this message on the mailinglist:
http://article.gmane.org/gmane.text.xml.fop.user/17545/match=external+graphic+scaling+50+attempts

Here is what I want:
If my image is smaller than the available width, do nothing. If its
bigger, scale it down.

However, no combination of properties unless I set explicit width seems
to work for larger images. Something thats not a good solution since I
am converting from a docbook document to pdf.

I did some debugging, and to me it looks like the
block-progression-dimension and inline-progression-dimension always
get set to auto in the java objects, no matter what I specifiy in the fo
file. This is what is suggested you should do in the above mentioned
mail, but its not working for me.

This is the sequence I use inside a page:
fo:flow flow-name=xsl-region-body
  fo:blockImage:/fo:block
  fo:block
fo:external-graphic
  src=path-to-large-image
  width=auto
  height=auto
  content-width=scale-to-fit
  content-height=scale-to-fit /
  /fo:block
/fo:flow

Are there any rules I can apply that will work for all images as I
described above, that is implemented in FOP 0.92beta?
-- 
Ståle Undheim
Systemutvikler

CoreTrek
Tlf.:   +47 51 97 85 97
E-post: [EMAIL PROTECTED]
WEB:www.coretrek.no

Simple is beautiful



signature.asc
Description: OpenPGP digital signature


Making wider files work

2006-05-23 Thread Stanimir Markov
Hi,

On a project I'm working, we need a replacement for the coldfusion's
cfdocument tag that is used to generate pdf files from an html content. We're
using this to produce a pdf version of reports that are generated on the fly. 

The problem is that cfdocument has a lot of annoying bugs, and we're looking to
switch to other technologie. After some fighting with tidy-css2xslfo-fop 0.92, I
was able to produce an report from a html+css converted to xhtml+css (tidy).
Then css2xslfo is used to produce the xsl-fo file and finally fop is used to
render the pdf. 

The problem is that the columns are too wide, and only the first two columns are
printed and the rest are lost (the report is really wide with 15+ columns). I'm
asking here :

Is FOP capable to scale (automagically) the input so that it fits the output
page width? I know the text becomes almost unreadable, but we need this. 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: span=all in last page sequence is dropping second last page from PDF

2006-05-23 Thread Adam




Hi Jeremias,

I modified one of the examples, based on
"examples/fo/pagination/franklin_2pageseqs.fo" and added a last page
sequence to it.

download @ http://users.bigpond.net.au/buddy/fop/lastpagespans.fo

The example is not 2 columns but the bug is evident. If you remove the
last fo:block with the span all the it renders correctly.
Page-position="last"
seems to be a factor.

Hope this helps
Cheers
Adam


Jeremias Maerki wrote:

  Column balancing is known to have some oddities. page-position="last" is
pretty new so it may well be that there are some problems left. An FO
file demonstrating the problem would be welcome.

On 19.05.2006 14:18:50 Adam Davies wrote:
  
  
Hi everybody, Need some help or may have found a bug
I have a complex page sequence below. I'm using the current FOP Trunk release BTW.  Some background setup info:
 fo:page-sequence-master master-name="contents" 
 fo:repeatable-page-master-alternatives
  
  fo:conditional-page-master-reference
   master-reference="leftPage"
   odd-or-even="even"
   page-position="first"/
  
  fo:conditional-page-master-reference 

   master-reference="rightPage"
   odd-or-even="odd"
   page-position="first" /
  
  fo:conditional-page-master-reference
   master-reference="leftPage" 
   odd-or-even="even"
   page-position="rest"/
  
  fo:conditional-page-master-reference 
   master-reference="rightPage" 
   odd-or-even="odd"
   page-position="rest" 
/
  
  fo:conditional-page-master-reference 
   master-reference="lastLeftPage"
   page-position="last"
   odd-or-even="even"/
  
  fo:conditional-page-master-reference 
   master-reference="lastRightPage" 
   page-position="last"
   odd-or-even="odd"/
  
 /fo:repeatable-page-master-alternatives
/fo:page-sequence-master

with a sample of the page: most a like this one
 fo:simple-page-master master-name="rightPage"
 page-height="297mm"
 page-width="210mm"
 margin-top="20mm"
 margin-bottom="59mm"
 margin-left="25mm"
 margin-right="59mm"
 fo:region-body
  column-count="2" 
  column-gap="5mm"
  margin-top="9mm"
  margin-bottom="10mm" /
 fo:region-before region-name="rightHeader" extent="10mm" /
 fo:region-after 
display-align="after" region-name="rightFooter" extent="5mm" /
/fo:simple-page-master
last page has a bigger footer due to extra info, see
fo:simple-page-master master-name="lastRightPage"
 page-height="297mm"
 page-width="210mm"
 margin-top="20mm"
 margin-bottom="59mm"
 margin-left="25mm"
 margin-right="59mm"
 
 fo:region-body 
  column-count="2" 
  column-gap="5mm"
  margin-top="9mm"
  margin-bottom="95mm"/
 fo:region-before region-name="rightHeader" extent="10mm" 
/
 fo:region-after display-align="after" region-name="lastRightFooter" extent="95mm" /
/fo:simple-page-master

As you can see I'm using two columns. The problem I'm getting is that
the content stops flowing to the last page area when a fo:block
span="all"XXX/fo:block is to appear last in the fo:flow. Soemtimes
the last page displays with XXX at the top if its the last block. The
main issue is that the second last page data is missing altogther.  The
second last page that renders is really the 3rd last. If I remove the
span block it work fine. I can render with XSL Formatter V3.4 Trial fine. 
Also towards the last 4 or so pages the column balance does a poor job.
Sometimes the first column is full to the bottom of the page and second
is emty. At the bottom of the page is a fo:block span = all for a new
title. I'm producing documents in the range of 20-40 pages long.
Is this a known problem? I'll also see if I can put together a sample
file as the content is confidential.
Regards
Adam

  
  

Jeremias Maerki


-
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]



RE: Seperating xml and tempalte but using one file

2006-05-23 Thread Shamem Miah



Sorry peopole but I am not following this, I apologise if I am coming across 
retarded. Would someone be kind enough as to show me how to convert my 
existing hello world files to achieve:
A)place both xml and xsl in one file(how would the new file 
look)B)how to change the fop program to accept this as input and produce 
outputExisting xml 
file:?xml version="1.0" 
encoding="UTF-8"?data 
param1hello/param1 
param2world/param2/dataExisting xsl 
file:?xml version="1.0" 
encoding="UTF-8"?xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
xmlns:fo="http://www.w3.org/1999/XSL/Format"xsl:template 
match="/"fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" 
fo:layout-master-set 
fo:simple-page-master 
master-name="simple" 
page-height="29.7cm" 
page-width="21cm" 
margin-top="0.2cm" 
margin-bottom="2cm" 
margin-left="2.5cm" 
margin-right="2.5cm" 
fo:region-body margin-top="2cm"/ 
fo:region-before extent="3cm"/ 
fo:region-after extent="1.5cm"/ 
/fo:simple-page-master 
/fo:layout-master-set fo:page-sequence 
master-reference="simple"  
fo:flow flow-name="xsl-region-body" 
  xsl:apply-templates 
select="data"/  
/fo:flow /fo:page-sequence 
/fo:root/xsl:templatexsl:template 
match="data" 
fo:block 
xsl:apply-templates 
select="param1"/ 
xsl:apply-templates 
select="param2"/ 
/fo:block/xsl:templatexsl:template 
match="param1" fo:block 
font-size="12pt" 
font-family="sans-serif" 
space-after.optimum="30pt" 
text-align="justify" 
 xsl:value-of 
select="."/ 
/fo:block/xsl:templatexsl:template 
match="param2" fo:block 
font-size="12pt" 
 
space-before.optimum="110pt" 
text-align="justify" 
 xsl:value-of 
select="."/ 
/fo:block/xsl:template/xsl:stylesheetExisting 
fop program:FopFactory fopFactory = 
FopFactory.newInstance(); 
  
 String doc = "helloworld" ; 
  
 
 OutputStream out = new 
BufferedOutputStream(new FileOutputStream(new 
File(doc+".pdf")));  
 
 
 
  
 
 try { 
 
 
   
 
  Fop fop = 
fopFactory.newFop("application/pdf", out); 
  
 
  TransformerFactory factory = 
TransformerFactory.newInstance();  
 
 
  Source xslt = new 
StreamSource(new File(doc+".xsl"));  
 
 
  Transformer transformer = 
factory.newTransformer(xslt);  
 
 
  Source src = "" 
StreamSource(new File(doc+".xml"));  
 
 
  Result res = new 
SAXResult(fop.getDefaultHandler());  
 
 
  transformer.transform(src, 
res);  
 
 
  
  
 
 } finally 
{many 
thanks-Original Message-From: Florent Georges [mailto:[EMAIL PROTECTED]]Sent: 
22 May 2006 13:44To: fop-users@xmlgraphics.apache.orgSubject: RE: 
Seperating xml and tempalte but using one fileShamem Miah 
wrote: Sorry I didn't understand that. Is it possible you can 
provide a link with an example or explanation? You can 
view the XSLT FAQ about the identity transformation: 
http://www.dpawson.co.uk/xsl/sect2/identity.html 
Basically, try something like that for the first 
transformation: 
xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
xmlns:fo="http://www.w3.org/1999/XSL/Format" 
xmlns:x_="http://www.fgeorges.org/Transform/Alias" 
version="2.0" xsl:namespace-alias 
stylesheet-prefix="x_" 
result-prefix="xsl"/ xsl:template 
match="@*|node()" 
xsl:copy 
xsl:apply-templates 
select="@*|node()"/ 
/xsl:copy 
/xsl:template xsl:template 
match="fo:*/text()" !-- 
Try to set a variable, instead. 
-- x_:value-of 
select="doc('')/to-datas/{.}"/ 
/xsl:template 
/xsl:transform It will transform the fo:* elements by 
wrapping their text nodes into xsl:value-of elements. So you'll give an 
XSLT script. Then use this script as usual, to produce the 
FO. You'll have maybe to customize the template rule matching "/", 
depending on what your document looks like (is it an FO or XSLT document?, 
etcetera). 
Regards,--drkm 
___Faites 
de Yahoo! votre page d'accueil sur le web pour retrouver directement vos 
services préférés : vérifiez vos nouveaux mails, lancez vos recherches et suivez 
l'actualité en temps réel.Rendez-vous sur http://fr.yahoo.com/set-To 
unsubscribe, e-mail: [EMAIL PROTECTED]For 
additional commands, e-mail: 
[EMAIL PROTECTED]


Re: Making wider files work

2006-05-23 Thread Manuel Mall
On Tuesday 23 May 2006 20:10, Stanimir Markov wrote:
 Hi,

 On a project I'm working, we need a replacement for the coldfusion's
 cfdocument tag that is used to generate pdf files from an html
 content. We're using this to produce a pdf version of reports that
 are generated on the fly.

 The problem is that cfdocument has a lot of annoying bugs, and we're
 looking to switch to other technologie. After some fighting with
 tidy-css2xslfo-fop 0.92, I was able to produce an report from a
 html+css converted to xhtml+css (tidy). Then css2xslfo is used to
 produce the xsl-fo file and finally fop is used to render the pdf.

 The problem is that the columns are too wide, and only the first two
 columns are printed and the rest are lost (the report is really wide
 with 15+ columns). I'm asking here :

 Is FOP capable to scale (automagically) the input so that it fits the
 output page width? I know the text becomes almost unreadable, but we
 need this.

When you talk about columns I assume you mean table columns?

ATM FOP cannot automatically size table columns based on the content. 
You must specify a column width for each column. However, the column 
width does not have to be absolute. You can use the 
proportional-column-width() function to specify a relative width 
(similar but not quite the same as specifying percentages). As I don't 
know the input html, css and the xsl you use it is hard to say if it 
will work in your case. In the end it boils down to having col 
width=10% / tags in your input (x)html and to translate them in the 
chain to fo:table-column width=proportional-column-width(10) / 
elements.

May be I misunderstand and what you want is automatic font scaling. No, 
FOP can't do that. It will use the font-size as specificed in the 
input .fo file.

Manuel

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Keep-Together Problems

2006-05-23 Thread Ross Nicholls



Hi there,

I am currently working on migrating our large 
XSL-FO project from FOP v0.20.5 to the new v0.92. Everything is going great and 
the new version offers some excellent advantages over the older one, I'm really 
looking forward to the SVG and MIF (or similar)output implementations when 
they materialise.
I do have one problem however:

The new version (0.92 beta) doesn't seem to cope 
too well with Keep-Together on table-rows (or any block level area for that 
matter) when the contents are actually larger than a page. In the old version 
(0.20.5) I was able to put a keep-together on the table-row which meant that 
each "product" from the catalogue would not be split over 2 pages UNLESS the 
product was too big to fit on a page of it's own. But with the new version, when 
it encounters such a product (table-row, that contains multiple blocks and image 
content) it crashes with an error - something like "Content does not fit in 
available area after 50 attempts, gave up to avoid an infinite 
loop".

Unfortunately, this means that we can't go ahead 
with the upgrade to the new version of FOP and take advantage of all the 
wonderful improvements - as the keep-togethers are very important.

Does anyone have any idea how I can get round this 
problem, or is there a fix available or possible???

I appreciate any help or comments anyone can 
give.


Kindest Regards,

Ross


RE: Seperating xml and tempalte but using one file

2006-05-23 Thread Shamem Miah



please guys, someone help.


From: Shamem Miah 
[mailto:[EMAIL PROTECTED] Sent: 23 May 2006 
14:40To: fop-users@xmlgraphics.apache.orgSubject: RE: 
Seperating xml and tempalte but using one file

Sorry peopole but I am not following this, I apologise if I am coming across 
retarded. Would someone be kind enough as to show me how to convert my 
existing hello world files to achieve:
A)place both xml and xsl in one file(how would the new file 
look)B)how to change the fop program to accept this as input and produce 
outputExisting xml 
file:?xml version="1.0" 
encoding="UTF-8"?data 
param1hello/param1 
param2world/param2/dataExisting xsl 
file:?xml version="1.0" 
encoding="UTF-8"?xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
xmlns:fo="http://www.w3.org/1999/XSL/Format"xsl:template 
match="/"fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" 
fo:layout-master-set 
fo:simple-page-master 
master-name="simple" 
page-height="29.7cm" 
page-width="21cm" 
margin-top="0.2cm" 
margin-bottom="2cm" 
margin-left="2.5cm" 
margin-right="2.5cm" 
fo:region-body margin-top="2cm"/ 
fo:region-before extent="3cm"/ 
fo:region-after extent="1.5cm"/ 
/fo:simple-page-master 
/fo:layout-master-set fo:page-sequence 
master-reference="simple"  
fo:flow flow-name="xsl-region-body" 
  xsl:apply-templates 
select="data"/  
/fo:flow /fo:page-sequence 
/fo:root/xsl:templatexsl:template 
match="data" 
fo:block 
xsl:apply-templates 
select="param1"/ 
xsl:apply-templates 
select="param2"/ 
/fo:block/xsl:templatexsl:template 
match="param1" fo:block 
font-size="12pt" 
font-family="sans-serif" 
space-after.optimum="30pt" 
text-align="justify" 
 xsl:value-of 
select="."/ 
/fo:block/xsl:templatexsl:template 
match="param2" fo:block 
font-size="12pt" 
 
space-before.optimum="110pt" 
text-align="justify" 
 xsl:value-of 
select="."/ 
/fo:block/xsl:template/xsl:stylesheetExisting 
fop program:FopFactory fopFactory = 
FopFactory.newInstance(); 
  
 String doc = "helloworld" ; 
  
 
 OutputStream out = new 
BufferedOutputStream(new FileOutputStream(new 
File(doc+".pdf")));  
 
 
 
  
 
 try { 
 
 
   
 
  Fop fop = 
fopFactory.newFop("application/pdf", out); 
  
 
  TransformerFactory factory = 
TransformerFactory.newInstance();  
 
 
  Source xslt = new 
StreamSource(new File(doc+".xsl"));  
 
 
  Transformer transformer = 
factory.newTransformer(xslt);  
 
 
  Source src = "" 
StreamSource(new File(doc+".xml"));  
 
 
  Result res = new 
SAXResult(fop.getDefaultHandler());  
 
 
  transformer.transform(src, 
res);  
 
 
  
  
 
 } finally 
{many 
thanks-Original Message-From: Florent Georges [mailto:[EMAIL PROTECTED]]Sent: 
22 May 2006 13:44To: fop-users@xmlgraphics.apache.orgSubject: RE: 
Seperating xml and tempalte but using one fileShamem Miah 
wrote: Sorry I didn't understand that. Is it possible you can 
provide a link with an example or explanation? You can 
view the XSLT FAQ about the identity transformation: 
http://www.dpawson.co.uk/xsl/sect2/identity.html 
Basically, try something like that for the first 
transformation: 
xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
xmlns:fo="http://www.w3.org/1999/XSL/Format" 
xmlns:x_="http://www.fgeorges.org/Transform/Alias" 
version="2.0" xsl:namespace-alias 
stylesheet-prefix="x_" 
result-prefix="xsl"/ xsl:template 
match="@*|node()" 
xsl:copy 
xsl:apply-templates 
select="@*|node()"/ 
/xsl:copy 
/xsl:template xsl:template 
match="fo:*/text()" !-- 
Try to set a variable, instead. 
-- x_:value-of 
select="doc('')/to-datas/{.}"/ 
/xsl:template 
/xsl:transform It will transform the fo:* elements by 
wrapping their text nodes into xsl:value-of elements. So you'll give an 
XSLT script. Then use this script as usual, to produce the 
FO. You'll have maybe to customize the template rule matching "/", 
depending on what your document looks like (is it an FO or XSLT document?, 
etcetera). 
Regards,--drkm 
___Faites 
de Yahoo! votre page d'accueil sur le web pour retrouver directement vos 
services préférés : vérifiez vos nouveaux mails, lancez vos recherches et suivez 
l'actualité en temps réel.Rendez-vous sur http://fr.yahoo.com/set-To 
unsubscribe, e-mail: [EMAIL PROTECTED]For 
additional commands, e-mail: 
[EMAIL PROTECTED]