XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Sandeep AswathanarayanaSubject: info required about fo processors:
Author: Sandeep Aswathanarayana
Date: 11 Apr 2007 03:05 AM
I have a requirement to generate a pdf document, it will have crosslinkings within the document. The links are to be assigned at the time of document generation.
The pdf is generated using xsl:fo- apache FOP.
The xsl:fo generates a pdf out of an xml document.

There must be links from one chapter in document to another. The link will point to an description of the reference within the same document. The link and its description both depend on input xml, so its not known prior to document generation. Using FOP we need to know the block id to give the reference to link.
Can you suggest how to solve this issue using FOP. If not possible with FOP, can you suggest any Fo processors that will support this feature.

Thanks in advance.
Sandeep.A

Postnext
Aleksey PayzanskySubject: info required about fo processors:
Author: Aleksey Payzansky
Date: 12 Apr 2007 04:40 AM
Originally Posted: 12 Apr 2007 04:29 AM
Dear Sandeep,

I have never worked with Apache FOP, but, based on my knowledge of xsl:fo, I do not think there should be a problem.
You would refer to the proper block_id in your FO script and assign the same block_id name in your XML code, or grab it dynamically, using XSL standard function generate-id().
I do not know your particular code, if you provide the one, maybe, I can help you to handle the problem. I am attaching the sample created myself - test.fo and the output file, test.pdf.
To generate this PDF file, I use XEP formatter from RenderX -
http://www.renderx.com/tools/index.html.
So you can obtain the trial license and try to play with. Also, some code examples and demos are available -
http://www.renderx.com/demos/examples.html

PS. I am not sure the attached FO code could be saved correctly, so here is my sample code:

<?xml version="1.0" encoding="UTF-8"?>

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="my-page">
<fo:region-body margin="1in"/>
</fo:simple-page-master>
</fo:layout-master-set>

<fo:page-sequence master-reference="my-page">
<fo:flow flow-name="xsl-region-body" font="12pt Times">
<fo:block>
<fo:block text-align="center" font-size="200%" font-weight="bold">Test document</fo:block>
<fo:block>Below there is the reference</fo:block>
<fo:basic-link color="blue" internal-destination="my_block_id">LINK</fo:basic-link>
<fo:block>Some text</fo:block>
<fo:block break-before="page" id="my_block_id" color="red">Link points on this text block</fo:block>
<fo:block>Some text</fo:block>
<fo:block break-before="page">Some text</fo:block>
<fo:block>Some text</fo:block>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>


Unknowntest(1).pdf
Sample output

Unknowntest(2).fo
Sample Code

Posttop
(Deleted User) Subject: info required about fo processors:
Author: (Deleted User)
Date: 13 Apr 2007 03:56 AM
For the record, the Personal Edition of RenderX XEP is bundled with Stylus Studio.

Alberto

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.