This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes [XSL/FO] displaying date in pdf file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "[XSL/FO] displaying date in pdf file" Watch "[XSL/FO] displaying date in pdf file" New topic
Author

[XSL/FO] displaying date in pdf file

Chris Neff
Greenhorn

Joined: Jun 04, 2003
Posts: 4
Greetings to all.
My first post in this community, so let's get startet with...
I'm facing a problem, creating PDF-Files using FO-source in a XSL-file.
What's given:
I use stylesheet version="1.0" and two xmlns:xsl (.../1999/XSL/Transform, .../1999/XSL/Format)
The <fo:root ...> is also .../1999/XSL/Format
What I'm trying to do:
I want to print the date-of-creation-of-the-PDF-file in the PDF-file itself. I am using a XSL-file with <fo:...></fo:...> syntax.
I tried it with

<xsl:script>
<![CDATA[
function retDate() {
var now = new Date();
return now;
}
]]>
</xsl:script>
<xsl:eval>
retDate()
</xsl:eval>

It does not work - the generation of the PDF with the FOP engine stops with no reasonable (for me) error.
If I want to display the page-number, I can simply use <fo age-number/>. Does such a command exist for Date and Time information?
If you're missing more information to give me advice, just tell me and I'll provide you with everything I know.
Thank you very much!


Chris Neff, aka Pumpelche<p><a href="http://www.mondagor.ch" target="_blank" rel="nofollow">www.mondagor.ch</a> | forum.mondagor.ch
Tony Yan
Ranch Hand

Joined: Apr 10, 2002
Posts: 170
What's the output of your .fo file? can you post that? I have a feeling that the error generated when XSL transformation is run before the pdf generation (XSL-FO). Could be a version issue.


Tony Yan<br /> <br />IBM Certified Developer XML and Related Technology<br />Sun Certified Web Component Developer For J2EE Platform<br />Sun Certified Programmer For Java 2 Platform
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Pumpelche welcome to the forums, just to let you know, the Ranch only has one rule and that deals with naming. Please change your name to fit the JavaRanch guidelines. Please read the naming policy below.
Naming Policy: http://www.javaranch.com/name.jsp
You can change your display name by clicking here: http://www.coderanch.com/forums/user/edit
Thank You
Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [XSL/FO] displaying date in pdf file
 
Similar Threads
looking for tool to convert xml to pdf
Need Help in working with javascript and XSL
How to generate PDF files in Java
XSL and XSLT
Converting RTF to XSL-FO