• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

XHTML to PDF Transformation

 
Ranch Hand
Posts: 452
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Friends,
I am using cocoons to transform xhtml to pdf, but my problem is that it requires xsl file for transformation. Is there any already available xls file which can do that for me. That is match all the xhtml tags to corresponding xsl-fo tags.
Thanks
 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm using FOP (xml to pdf )for the past few monthns and to my knowledge the answer is NO.
 
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
just curious:
Does cocoon use fop or do they have their own mechanism?
I am working for 1.5 weeks now with fop. Not easy but o.k.
Important when you embed larger images: Set jvm heap size up with -Xmx -Xms option! This one drove me nuts yesterday.
Axel
 
Prakash Dwivedi
Ranch Hand
Posts: 452
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello friends,
thanx for the response. can you plz tell me from where can i learn writing xsl-fo tags(as there is no other option i think).
Also I need to convert xml/xhtml document to pdf as well as in rtf formats. exapmle of how to convert xml to pdf is available in cocoon page. but i could not find any example of how to convert xml to rtf(using coccoon).
Thanx in advance
 
Balaji Loganathan
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Axel Janssen:
just curious:
Does cocoon use fop or do they have their own mechanism?
Axel


Yes Cocoon is using apache fop only, if you look at the lib folder of cocoon, you can see the jar file.
I still haven't received my Cocoon 2 Programming: Web Publishing with XML and Java book from Javaranch, once I have it I can tell you for sure
 
Balaji Loganathan
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Prakash Dwivedi:
Hello friends,
where can i learn writing xsl-fo tags(as there is no other option i think).
how to convert xml to rtf.
Thanx in advance


there is lot of tutorial available in internet now, search in google with keyword "Fop Tutorial"
u can try this tutorial http://www.ibiblio.org/xml/books/bible2/chapters/ch18.html or the best option is to download the fop package and start running the examples by modifying them a little by little, IBM is also having also a tutorial on FOP(forgot the link)
Some live fop examples were hosted on this site http://www.webappcore.com/fop/pages/welcome.jsp
 
Axel Janssen
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is a specialiced book about xsl-fo, I have put in one of the slots of my O'Reilly safari bookshelf.
I used the examples and the free chapter of xml-bible more often than the book. Book goes often too deep for my taste. It might be more usefull if you allready got the basics of xsl-fo.
Axel
 
Balaji Loganathan
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Axel Janssen:

Important when you embed larger images: Set jvm heap size up with -Xmx -Xms option! This one drove me nuts yesterday.
Axel


Another important things
1. Don't scale down the image sixe in xsl:fo, avoid resizing image size: orginal size:10x20, xsl:fo size 5x10, will create processing cost, better create a new original with 5x10 size.
2. Use PNG images than jpg or gif or bmp etc., requires little jar configuraition.
 
reply
    Bookmark Topic Watch Topic
  • New Topic