Re: {VIRUS?} Upper Unicode characters supported?

2007-01-26 Thread Vincent Hennebert
Hi Dominic,

Dominic Marcotte a écrit :
 Hello,
 
 We need to use Unicode characters in the IPA range (U0250-U02A8). We use
 and embed Lucida Sans Unicode which contains these characters. We notice
 that higher character than U00FF display # in the generated PDF. On
 the other hand, lower character than U0100 work fine. We even tried with
 the version FOP Trunk revision 499827. (Jan 24th) with Saxon 8.7 and
 Xalan 2.7.0. We also tried other font supporting IPA. Same thing append.
 
 In the past, we already succeeded in making it works with an older
 version of FOP.
 
 I include the FO, config and the fonts file in attachment.
 
 Do you have any suggestion?

Are you sure you don't get any warning when running Fop? Something like:
Font 'LucidaSansUnicode,normal,400' not found. Substituting with
'any,normal,400'
The value of the metrics-url attribute isn't actually a URL; that might
work, but to be sure try adding file:// before.
Also, do you specify the config file on the command-line?
fop -c fop-config.xml ipa.fo.xml res.pdf

HTH,
Vincent

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problems with fop-0.20.5 and batik-all-1.6.

2007-01-26 Thread Chris Bowditch

Iris Soto wrote:


Hello,
I am using jfreechart-0.9.20 to generate svg graphics this require 
batik-all1.6 to work.  I'm also using fop-0.20.5 with batik-all-1.6 but 
when I render to pdf document the image doesn't appear.
In the mailing list I read that fop-0.20.5 is not compatible with 
batik-all-1.6, that is necessary to use the fop's batik version, so when 
I try to drop dependency from my pom.xml the batik-all-1.6 the 
jfreechart's class dont work.


Fop v0.20.5 is v.old now. The recommended course of action is to upgrade 
to v0.93 which ships with batik-all-16.jar.


The image that obtain of jfreechart is serialized to xml with 'svg2xml', 
later on I insert this xml with a instream-object, but the PDF file 
generated don't show the svg inserted¡. How could I mix all this 
versions? what repository you recommend me to obtain this jars?


Don't try to mix versions it won't work./ If you need batik 1.6 for 
jfreechart to work then use Fop v0.93. It implements much more of the 
spec than 0.20.5.


snip/

Chris




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Upper Unicode characters supported?

2007-01-26 Thread Jeremias Maerki
Please regenerate the XML font metrics file and don't use the -enc ansi
switch. Then it will work.

On 25.01.2007 20:51:26 Dominic Marcotte wrote:
 ATTENTION !!!
 Au moins une pièce jointe à ce message ne vous a pas été transmise
 (fop.bat).
 SVP lire la pièce jointe «AlerteVirus.txt» pour plus d'informations.
 
 Hello,
 
 We need to use Unicode characters in the IPA range (U0250-U02A8). We use 
 and embed Lucida Sans Unicode which contains these characters. We notice 
 that higher character than U00FF display # in the generated PDF. On 
 the other hand, lower character than U0100 work fine. We even tried with 
 the version FOP Trunk revision 499827. (Jan 24th) with Saxon 8.7 and 
 Xalan 2.7.0. We also tried other font supporting IPA. Same thing append.
 
 In the past, we already succeeded in making it works with an older 
 version of FOP.
 
 I include the FO, config and the fonts file in attachment.
 
 Do you have any suggestion?
 
 Dominic
 
 



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: RTF Border Problem

2007-01-26 Thread Jeremias Maerki
I've tried to manipulate the RTF by hand to see if there's a way to get
separate borders but I didn't manage. There's a \brdrbtw command in
RTF. It's documentation suggest it is used to control exactly that. But
I didn't see any change when playing with it. So I wouldn't know how to
fix this in our code.

Your best bet is to work around it by changing your:
fo:block linefeed-treatment=preserve/
to
fo:block font-size=1pt#160;/fo:block


On 26.01.2007 01:48:39 Tim Keen wrote:
RTF Border Problem
 Hi all,
 
 I've come across what I believe is a small problem with the RTFrenderer.
 The fo shows a bordered block (line 231), empty block,bordered block.
 What I expect is 2 distinct bordered paragraphs witheither an empty
 paragraph or no paragraph in between. What I get(swan.rtf) is 2
 paragraphs with a border around both paragraphseffectively bordering
 the paragraphs together.
 
 Am I being unreasonable? Is this really a problem with me?
 
 Please let me know.
 
 FWIW I'm using FOP.0.93.
 
 Cheers
 
 Tim Keen



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Distribute fonts in jar

2007-01-26 Thread David Morales

Hi all...

I need to distribute all xsl-stuff in a jar file, including fonts 
(userconfig.xml, fonts.xml, and ttf files)... but can fop read fonts 
from a URL?? I mean, fop will try to read font from something like 
file:c:/folder/lib.jar!fonts/font.xml


This is the problem if i try to do something like that

[ERROR] Failed to read font metrics file 
file:/C:/lib/lib1.jar!/fuentes/ComicSansMSBold.xml: 
C:\lib\lib1.jar!\fuentes\ComicSansMSBold.xml (The system cannot find the 
path specified)





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Distribute fonts in jar

2007-01-26 Thread Adrian Cumiskey

This should work..

Try using the URL jar protocol :-

jar:file:///c:/folder/lib.jar!fonts/font.xml

Adrian.

David Morales wrote:

Hi all...

I need to distribute all xsl-stuff in a jar file, including fonts 
(userconfig.xml, fonts.xml, and ttf files)... but can fop read fonts 
from a URL?? I mean, fop will try to read font from something like 
file:c:/folder/lib.jar!fonts/font.xml


This is the problem if i try to do something like that

[ERROR] Failed to read font metrics file 
file:/C:/lib/lib1.jar!/fuentes/ComicSansMSBold.xml: 
C:\lib\lib1.jar!\fuentes\ComicSansMSBold.xml (The system cannot find the 
path specified)





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Error: Content is not allowed in prolog

2007-01-26 Thread Jeff Vannest
I've embedded FOP 0.93 successfully am able to process XML+XSLFO=PDF.
However, when I try embed fonts I get this error message:

Caught exception: javax.xml.transform.TransformerException:
java.lang.RuntimeException: Content is not allowed in prolog.

This only occurs when I place the following into my userconfig.xml file:

font metrics-url=arial.ttf embed-url=arial.xml
   font-triplet name=Arial style=normal weight=normal/
/font

The arial.xml file was created using the following command line:

java -cp
build\fop.jar;lib\avalon-framework-4.2.0.jar;lib\commons-logging-1.0.4.jar;l
ib\commons-io-1.1.jar org.apache.fop.fonts.apps.TTFReader ARIAL.TTF
arial.xml

The resulting arial.xml file starts with ?xml version=1.0
encoding=UTF-8? with no preceding characters, and is followed with a line
break and the font-metrics tag as the root.

If I comment out the font metrics for the font everything works correctly
again.

Does anyone know why I'm getting the Content is not allowed in prolog
error?

TIA,
Jeff




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Error: Content is not allowed in prolog

2007-01-26 Thread Jeremias Maerki

On 26.01.2007 15:42:49 Jeff Vannest wrote:
 I've embedded FOP 0.93 successfully am able to process XML+XSLFO=PDF.
 However, when I try embed fonts I get this error message:
 
 Caught exception: javax.xml.transform.TransformerException:
 java.lang.RuntimeException: Content is not allowed in prolog.
 
 This only occurs when I place the following into my userconfig.xml file:
 
 font metrics-url=arial.ttf embed-url=arial.xml

Should be:
font metrics-url=arial.xml embed-url=arial.ttf


font-triplet name=Arial style=normal weight=normal/
 /font
 
 The arial.xml file was created using the following command line:
 
 java -cp
 build\fop.jar;lib\avalon-framework-4.2.0.jar;lib\commons-logging-1.0.4.jar;l
 ib\commons-io-1.1.jar org.apache.fop.fonts.apps.TTFReader ARIAL.TTF
 arial.xml
 
 The resulting arial.xml file starts with ?xml version=1.0
 encoding=UTF-8? with no preceding characters, and is followed with a line
 break and the font-metrics tag as the root.
 
 If I comment out the font metrics for the font everything works correctly
 again.
 
 Does anyone know why I'm getting the Content is not allowed in prolog
 error?
 
 TIA,
 Jeff



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Lines are hiding in AWTViewer perhaps Bug in Java2DRenderer or Java2D itsself

2007-01-26 Thread Cheffe

Since i didnt get it working right...
I tried to produce a small sample with the same behaviour, but i cant
produce this with my own small sample.
So i think the prob must be somewhere else in the code of the awt rendering.
Here is my example:

// Sample should show that thin lines disappear while the bufferedimage is
scaled,
// but it doesnt happen, its only happening in the awt-viewer in fop
// Are the lines in Java2DRenderer painted in a different way to this
sample?

package test;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.geom.AffineTransform;
import java.awt.geom.Line2D;
import java.awt.image.BufferedImage;

import javax.swing.JFrame;
import javax.swing.JPanel;

public class Test
{

public static void main(String[] args)
{
JFrame f = new JFrame();
f.setSize(200,200);
f.setContentPane(new MyPanel());
f.setVisible(true);
f.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
f.setLocationRelativeTo(null);
}

}

class MyPanel extends JPanel
{

private static final long serialVersionUID = 736771368105010125L;

private BufferedImage imageBuffer;

public MyPanel()
{
setLayout(new BorderLayout());
AffineTransform f = new AffineTransform();
f.scale(0.3453543455f,0.3453543455f);
imageBuffer = new BufferedImage(100, 100, 
BufferedImage.SCALE_SMOOTH);
Graphics2D graphicsBuffer = imageBuffer.createGraphics();
graphicsBuffer.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
graphicsBuffer.setRenderingHint(RenderingHints.KEY_RENDERING,
RenderingHints.VALUE_RENDER_QUALITY);
graphicsBuffer.setTransform(f);
graphicsBuffer.setColor(Color.WHITE);
graphicsBuffer.draw(new Line2D.Float(30, 10, 0.2f, 10));
graphicsBuffer.draw(new Line2D.Float(40, 10, 0.5f, 20));
graphicsBuffer.draw(new Line2D.Float(50, 10, 0f, 30));
}

public void paintComponent(Graphics g) {
g.drawImage(imageBuffer, 0, 0, null);
}

}




Cheffe wrote:
 
 Me again.
 I tried some changes in the source to find a solution for the prob...
 I did the follow:
 
 -ImageProxyPanel-
 paintComponent(Graphics g)
 {
 getPageasImage(g);   // changed the params
 ...
 //g.paintImage(...) //commented out
 }
 
 - i think it was Java2DRenderer -
 getPageasImage(Graphics gg)
 {
 //Graphics g = image.create.Graphics(); //commented out
 Graphics g = gg; //changed the params
 ...
 }
 
 So it painted it directly to the panel, but the lines are still hiding
 when i zoom.
 Any helpful hints are still welcome.
 I tried to investigate how the debuglines in the viewer are made, cause
 the debuglines are painted correctly while scaling but i didnt get it.
 Difficult to understand =)
 
 
 Jeremias Maerki-2 wrote:
 
 Oh, I think you hit the nail on the head with that link. It is indeed so
 that the page is first painted to a bitmap which is then painted on the
 panel. So, it appears as if painting the page directly on the panel
 could potentially solve the problem.
 
 But what I don't know is whether there was a particular reason that we
 use (and cache) bitmaps to paint the pages instead of painting them
 directly. At first glance, it appears to be a waste of a lot of memory.
 If I were you I'd experiment with changing
 ImageProxyPanel.paintComponent().
 
 On 22.01.2007 13:47:05 Cheffe wrote:
 
 I found somethin but dont know exactly how to use the info =(
 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4109583 Sun Bug
 4109583 
 Someone says if you us use transed graphics to draw line there is no
 prob
 anymore.
 
 
 Jeremias Maerki-2 wrote:
  
  It seems more like a general Java2D issue. Can you please search the
 web
  for hints? I'm sure someone else has run into a similar problem
 before.
  From there we can see if we can find a solution. I don't know off-hand
  how to solve this.
  
  On 22.01.2007 10:54:39 Cheffe wrote:
  
  Has anyone also realized this issue in the AWTViewer? A hint is
 always
  welcome =)
 
 
 Jeremias Maerki
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Lines-are-hiding-in-AWTViewer-perhaps-Bug-in-Java2DRenderer-or-Java2D-itsself-tf3049992.html#a8653116
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,