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:    
hello    
worldExisting xsl 
file:http://www.w3.org/1999/XSL/Transform" 
xmlns:fo="http://www.w3.org/1999/XSL/Format">  http://www.w3.org/1999/XSL/Format">   
 
   
page-height="29.7cm"   
page-width="21cm"   
margin-top="0.2cm"   
margin-bottom="2cm"   
margin-left="2.5cm"   
margin-right="2.5cm">   
   
   
 
  
       
   
       
     
 
    
    
   
   
font-family="sans-serif" 
space-after.optimum="30pt" 
text-align="justify">    
        
       
 
space-before.optimum="110pt" 
text-align="justify">    
        
Existing 
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:    
    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">     
result-prefix="xsl"/>      
  
    
  
            
    
  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]


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: 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
>  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  tags in your input (x)html and to translate them in the 
chain to  
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]



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:    
hello    
worldExisting xsl 
file:http://www.w3.org/1999/XSL/Transform" 
xmlns:fo="http://www.w3.org/1999/XSL/Format">  http://www.w3.org/1999/XSL/Format">   
 
   
page-height="29.7cm"   
page-width="21cm"   
margin-top="0.2cm"   
margin-bottom="2cm"   
margin-left="2.5cm"   
margin-right="2.5cm">   
   
   
 
  
       
   
       
     
 
    
    
   
   
font-family="sans-serif" 
space-after.optimum="30pt" 
text-align="justify">    
        
       
 
space-before.optimum="110pt" 
text-align="justify">    
        
Existing 
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:    
    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">     
result-prefix="xsl"/>      
  
    
  
            
    
  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: 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:
 
 
  
  
  
  
  
  
  
  
  
  
  
  
  
 


with a sample of the page: most a like this one
 
 
 
 

last page has a bigger footer due to extra info, see

 
 
 
 


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 XXX is to appear last in the . 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]



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



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:

  Image:
  

  


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


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