473,769 Members | 6,473 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Inconsistent FOP behavior ?

Hi,

I am pulling my hair out trying to figure out a problem that I am having
using FOP to generate PDFs that have embedded SVG graphics.

The base 64 encoded SVG is embedded as an attribute within a source XML
document

<?xml version="1.0" encoding="UTF-8"?>
<ReportCashAcct Stmt portfolioCode=" FIXED_1" portfolioRptNam e="Fixed Interest
testing#1" brandingImage=" &lt;svg:imag e width=&quot;588 &quot;
height=&quot;11 8&quot; xlink:href=&quo t;data:image/jpeg;base64,/9j/4AAQSkZJ
...... &quot; transform=&quot ;matrix(1 0 0 1 0 0)&quot;/&gt;">
An XSL-T is used to generate the XSL-FO, and the SVG is embedded thus;

<fo:instream-foreign-object width="3cm" height="1cm"
xmlns:xlink="ht tp://www.w3.org/1999/xlink"
xmlns:svg="http ://www.w3.org/2000/svg">
<svg:svg width="3cm" height="1cm" viewBox="0 0 118 558"
xml:space="pres erve" >
<svg:g><xsl:val ue-of select="@brandi ngImage"
disable-output-escaping="yes"/></svg:g></svg:svg>
</fo:instream-foreign-object>

Now when I run this through Xalan command line I generate the correct XSL-FO
(including the embedded image) that can be fed to FOP directly and creates a
PDF, for example .

$ java org.apache.xala n.xslt.Process -IN Untitled8.xml -XSL
reportClientPac kFO.xsl -OUT Untitled8.fo
$ java org.apache.fop. apps.Fop -fo Untitled8.fo -pdf ~/Untitled8.pdf

This works fine, however if I use FOP directly to generate the PDF using the
stylesheet and source XML the image is missing !

$ java org.apache.fop. apps.Fop -xsl reportClientPac kFO.xsl -xml
Untitled8.xml -pdf ~/Untitled8.pdf

does not work (i.e. the image does not get embedded in the resulting PDF)
!!!

I have tried various different versions of FOP/Xerces/Xalan/Batik to no
avail, and I would really appreciate any advice anyone might have.

Thanks and regards,
Andrew
Jul 20 '05 #1
0 1414

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1907
by: Denis S. Otkidach | last post by:
I've noticed that the order of attribute lookup is inconsistent when descriptor is used. property instance takes precedence of instance attributes: >>> class A(object): .... def _get_attr(self): .... return self._attr .... attr = property(_get_attr) .... >>> a=A()
1
2090
by: bk_kl | last post by:
Hi, I think the following behavior of the build in function 'split' is inconsistent. What do you think? >>> "".split() >>> "".split(";")
7
10240
by: Alex Vorobiev | last post by:
hi there, i am using sql server 7. below is the stored procedure that is giving me grief. its purpose it two-fold, depending on how it is called: either to return a pageset (based on page number and page size), or to return IDs of previous and next records (based on current record id). the problem is, that the order in which records are inserted into the temp table is inconsistent, even though the calling statement and the order by is...
9
1760
by: Marina | last post by:
Here is the problem. If 2 different properties on the same (or different) control are bound to the same data column, changing the Text property and calling EndCurrentEdit discards the new value. Changing a custom property and calling EndCurrentEdit accepts the new value, stores it in the datasoure and behaves normally. Here is a reproduceable example: First, extend Textbox: Public Class MyTextBox Inherits TextBox
7
1467
by: Matt Silberstein | last post by:
Here is an odd one. Take a look at http://www.nyccure.com/test/changes.html using Firefox. Now reload the page a few times. It will change. All I have is a ul with some images as list items. Yes, I know that inline-block is not defined and I am sure that is the problem. But it is not simply that it does not display the way I thought, it is that the display changes with the reload. --
0
1628
by: Itai | last post by:
Background: I have four Web Form pages with respective C# code behind files, all in the same project: localhost/vpath1 Page1.aspx Page2.aspx
20
2623
by: Francine.Neary | last post by:
I am learning C, having fun with strings & pointers at the moment! The following program is my solution to an exercise to take an input, strip the first word, and output the rest. It works fine when you give it 2 or more words, but when there's only 1 word the results vary depending on whether it's on Windows or Linux: under MSVC it displays no output (as it should); under gcc/Linux it instead gives "Segmentation fault". Any ideas...
9
1517
by: Lie | last post by:
I've noticed some oddly inconsistent behavior with int and float: Python 2.5.1 (r251:54863, Mar 7 2008, 03:39:23) on linux2 -345 works, but Traceback (most recent call last): File "<stdin>", line 1, in <module>
6
1329
by: Kai-Uwe Bux | last post by:
Juha Nieminen wrote: I think your code violates the One-Definition-Rule. The template function foo() is defined in two significantly different ways in the two files. As far as I know, no diagnostic is required for such errors.
0
165
by: James Kanze | last post by:
On May 16, 9:34 am, Paavo Helde <nob...@ebi.eewrote:
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10049
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9997
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8873
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.