xsl-fo

Image not displayed on pdf

五迷三道 提交于 2019-12-25 03:59:05
问题 I'm trying to include an image into a pdf wich is generated via XSL using Apache Cocoon. I've read about the tag <fo:external-graphic> wich works fine when a image is stored on the local drive or when you request an image wich resides physically on any server. But what i need is to show in the pdf an image (codebar image) wich is generated dinamically by a jsp , that is to say, java generates the image and it will never be stored on the hard drive. The image is generated correctly by the jsp

Dynamic XSL file

别来无恙 提交于 2019-12-25 02:57:45
问题 I have 3 XSL files which have paths in them to something like C:\templates\Test\file.pdf This path isn't always going to be the same and rather than having it hard coded in the XSL, I'd like it so that the path C:\templates\test\ is replaced with a tag [BASEPATH] and when I read in the xsl file into the XSLTransform object (yes I know it's been deprecated, I may move over to the XSLCompiledTransform at the same time), I'd like the tag [BASEPATH] to be replaced with the absolute file path of

How do I display output variable text in XSL

≯℡__Kan透↙ 提交于 2019-12-25 02:27:14
问题 I am using xsl:fo to generate a pdf using apache FOP, when I have come across the following issue: <fo:table-cell xsl:use-attribute-sets="btInfo mt10pt mb10pt"> <fo:block text-align="left" linefeed-treatment="preserve"> <xsl:text disable-output-escaping="yes"><xsl:value-of select="BankDetails" /> </xsl:text> </fo:block> </fo:table-cell> where bankDetails is a variable which contains entire paragraph of text with html tags. When I print it as is,it displays html tags literally(such as <p>, <br

XSL FOP Kannada font not appearing properly

落爺英雄遲暮 提交于 2019-12-25 00:28:43
问题 I have configured TrueType file in configuration file like this <fop version="1.0"> <renderers> <renderer mime="application/pdf"> <fonts> <font embed-url="Nudi_05_k.ttf" kerning="yes"> <font-triplet name="kannada" style="normal" weight="normal" /> </font> <!-- <font embed-url="Nudi_05_k.ttf" kerning="yes" sub-font="kannada"> <font-triplet name="kannada" style="normal" weight="normal" /> </font> --> </fonts> </renderer> </renderers> It has to be displayed in the format as ಪ.ಪೂ.ಶಿ/ಪ್ರ.ಅ/99-2000

image in PDF from Apache FOP 1.1 with Java

家住魔仙堡 提交于 2019-12-24 14:40:23
问题 i have a strange problem. im creating a PDF document from Java with apache FOP 1.1. If i create this file from eclipse, it works well. If i export my Programm as a jar file, it doesn work. the XSL-FO File is: <?xml version="1.0" encoding="ISO-8859-1"?> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:output method="xml" indent="yes" /> <xsl:template match="/"> <fo:root font-family="Arial"> <fo:layout-master-set> <fo:simple-page-master master

Displaying images in a grid with XSL-FO

我的梦境 提交于 2019-12-24 14:25:21
问题 <xsl:template match="PrintingImages"> <fo:block keep-together.within-page="always"> <fo:table table-layout="fixed" width="100%" border-collapse="separate" border-separation="2pt" column-width="50pt"> <fo:table-body> <fo:table-row> <xsl:apply-templates/> </fo:table-row> </fo:table-body> </fo:table> <xsl:template match='PrintImagesData'> <fo:table-cell> <fo:block keep-together.within-page="always" float="left"> <xsl:if test="Title"> <fo:block><xsl:value-of select="Title" /></fo:block> </xsl:if>

How to create Bookmarks in XSL-FO?

早过忘川 提交于 2019-12-24 12:40:11
问题 i have XML with chapters and there can be any number of chapters inside one chapter. how to create a Bookmark for the same.: 1. Chapter 1 1.1 chapter 1.1 1.1.1 Chapter 1.1.1 1.2 Chapter 1.2 2.Chapter 2 2.1 Chapter 2.1 2.2 Chapter 2.2 i tried using: <fo:bookmark-tree> <fo:bookmark internal-destination="toc"> <fo:bookmark-title> Table Of Contents </fo:bookmark-title> <fo:bookmark internal-destination="CHAPTER/LONG-NAME" starting-state="show"> <fo:bookmark-title> <xsl:for-each select="//CHAPTER"

Unanticipated <xsl:apply-imports/> behavior

人走茶凉 提交于 2019-12-24 04:30:14
问题 I've been trying to figure out how to best modularize my XSLT stylesheets to facilitate re-use. I hit upon the idea of using <xsl:apply-imports/> as a way of introducing document-specific attributes to standard tag transformations. This is not working the way I expected it would, and I can't even begin to fathom what is going on here. Here is a simplified version of the stylesheet: <!-- main.xsl --> <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3

Can't generate PDF with Apache FOP

眉间皱痕 提交于 2019-12-24 03:41:31
问题 I am trying to use Apache FOP to create a PDF using XML data and a XSL stylesheet but I keep getting the following error org.apache.fop.apps.FOPException: org.apache.fop.fo.ValidationException: "{http://www.w3.org/1999/XSL/Format}block" is not a valid child of "fo:root"! (No context info available) javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException: "{http://www.w3.org/1999/XSL/Format}block" is not a valid child of "fo:root"! (No context info available) The

Generate PDF with XSL-FO for Android

好久不见. 提交于 2019-12-24 02:11:50
问题 Is it possible to generate a PDF in an Android application using XSL-FO? 回答1: Download Apache FOP and see if the required dependencies are includes in Android's runtime. It might be rather slow. You could use iText or PDFBox to render PDF - or use a server and let Android just request a PDF creation. 来源: https://stackoverflow.com/questions/9393679/generate-pdf-with-xsl-fo-for-android