IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Profile: fabiodap
About
User Name: fabiodap
Forum Rank: Member
Real Name:
Location
Occupation:
Interests:
Gender: None Specified
Statistics
Joined: Tuesday, August 28, 2007
Last Visit: Thursday, November 5, 2009 8:54:49 AM
Number of Posts: 20
[0.11% of all post / 0.00 posts per day]
Avatar
Last 10 Posts
Topic: Problem with Footer/Header in SV2010
Posted: Thursday, November 5, 2009 8:41:37 AM
I have a problem with SV2010.
I opened a project made with 2009.
With 2009 i generated the xsl-fo file (XSLT 1.0) and generated the PDF file with fop 0.20.5 without problems. The rendering was correct.

With 2010, i opened the same project, generated the xsl (also XSLT 1.0) and generated the PDF file. But this time i get these errors:

[INFO] area contents overflows area in line Medico
[INFO] area contents overflows area in line
[WARNING] Sum of fixed column widths 307512 greater than maximum specified IPD 0
[INFO] area contents overflows area in line
[INFO] area contents overflows area in line
[INFO] area contents overflows area in line
[ERROR] leader sizes wrong
[ERROR] leader sizes wrong
[INFO] area contents overflows area in line Firmato

The [INFO] lines are related to lines contained in Header and Footer.

Hereafter you can see the pictures of the document generated with SV09 and SV10.





Somebody can explain me what i should change on 2010 so that i can generate correctly?
Topic: Is it possible to use dataURL scheme in SPS files
Posted: Tuesday, November 3, 2009 10:40:04 AM
WOW. It works!

Added this piece of code in my XML file:

<title><![CDATA[<fo:external-graphic
src="url('data:image/gif;base64,R0lGODdhMAAwAPAAAAAAAP///ywAAAAAMAAwAAAC8IyPqcvt3wCcDkiLc7C0qwyGHhSWpjQu5yqmCYsapyuvUUlvONmOZtfzgFzByTB10QgxOR0TqBQejhRNzOfkVJ+5YiUqrXF5Y5lKh/DeuNcP5yLWGsEbtLiOSpa/TPg7JpJHxyendzWTBfX0cxOnKPjgBzi4diinWGdkF8kjdfnycQZXZeYGejmJlZeGl9i2icVqaNVailT6F5iJ90m6mvuTS4OK05M0vDk0Q4XUtwvKOzrcd3iq9uisF81M1OIcR7lEewwcLp7tuNNkM3uNna3F2JQFo97Vriy/Xl4/f1cf5VWzXyym7PHhhx4dbgYKAAA7')"
height="3cm" width="3cm" />]]></title>

And then mapped this node as an unparsed content in my stylesheet. And when i render with FOP my image is shown.

Great.

Fabio
Topic: Header on first page only
Posted: Tuesday, October 27, 2009 12:45:39 PM
I'm afraid it's not possible.
You can read this thread which discusses exactly a "mirror" situation. But i'm afraid that if it wasn't possible for that one, it's also not possible for this one.
https://www.altova.com/forum/default.aspx?g=posts&t=1000001257

Greetings,
Fabio
Topic: Problems rendering PDF with fop 0.20.5 and Stylevision 2009
Posted: Tuesday, October 6, 2009 9:09:11 AM
Stylevision cannot show the PDF file because it intercepts the Error generated by the FOP.
In older versions of Stylevision this Error (which is not really one, because the PDF is generated anyway) was not intercepted and the PDF was shown.

[ERROR] unknown font Arial,normal,bold so defaulted font to any
[ERROR] unknown font Arial,normal,normal so defaulted font to any
[ERROR] unknown font Arial,normal,normal so defaulted font to any

Problem solved by mapping the fonts in FOP configuration.
For more info check this link: http://xmlgraphics.apache.org/fop/trunk/fonts.html

The following procedure is valid for fop 0.20.5. It can be slightly different for more recent versions of FOP.

a) Generate a Font Metrics file for the Font you want to use. Have a look to the link up here to see how to generate this file(s).

I made an example for the font Arial. By default FOP doesn't recognize this font. It will replace it with 'ANY'. With this procedure the font Arial will be recognized and used correctly.

In my case i generated the font metrics and placed it here:

c:\MyFonts\ttfarial.xml

b) My fop is located in the directory "fop-0.20.5".
Modify the last row of the file fop-0.20.5\fop.bat in the following way:

from: java -cp "%LOCALCLASSPATH%" org.apache.fop.apps.Fop %1 %2 %3 %4 %5 %6 %7 %8

to: java -cp "%LOCALCLASSPATH%" org.apache.fop.apps.Fop %1 %2 %3 %4 %5 %6 %7 %8 -c .\conf\config.xml

In this way fop will use the config.xml file when starting.

c) In the directory: fop-0.20.5\config modify the file config.xml in the following way:

From

<fonts>
</fonts>

to

<fonts>
<font metrics-file="c:\MyFonts\ttfarial.xml" kerning="yes" embed-file="C:\windows\fonts\arial.ttf">
<font-triplet name="Arial" style="normal" weight="normal" />
</font>
<font metrics-file="c:\MyFonts\ttfarial.xml" kerning="yes" embed-file="C:\windows\fonts\arial.ttf">
<font-triplet name="Arial" style="normal" weight="bold" />
</font>
</fonts>

d) In stylevision select fop 0.20.5 as FO processor PDF.

Hope this can be helpful for somebody.
Fabio
Topic: Problems rendering PDF with fop 0.20.5 and Stylevision 2009
Posted: Friday, October 2, 2009 6:26:57 AM
Hello,

also the command line: fop.bat -fo some.fo -pdf some.pdf works if executed from a shell window.

Gives exctly the same output as in Stylevision, telling you there are some Warnings or Errors, but the PDF file is generated. So i'm still curious to know why Stylevision does not show the generated PDF file.

Greetings,
Fabio

rip wrote:
1) The command line generated by StyleVision is

fop.bat -fo some.fo -pdf some.pdf

2) The command line you are using in the cmd window is

fop.bat -xml myxml.xml -xsl myxslt.xslt -pdf outfile

The documentation for StyleVision, PDF page 736 has discussion on the SV command line.

The FOP documentation has discussion on what the semantic difference is between the params -fo/-pdf and params -xml/-xsl/-pdf

Topic: Problems rendering PDF with fop 0.20.5 and Stylevision 2009
Posted: Thursday, October 1, 2009 11:34:27 AM
any hints on this?

Greetz,
Fabio
Topic: Problems rendering PDF with fop 0.20.5 and Stylevision 2009
Posted: Wednesday, September 30, 2009 8:36:29 AM
rip wrote:
The xslt is the same,

but check how fop 0.20.5 takes command line arguments, vs how 0.93-0.05 do.

What errors are generated when done from within StyleVision ([Preview PDF], change it to [FO Result], copy paste it here)


I checked, the command line parameters are different. 0.94 has more options than 0.20. But for both versions it can be invoked like this: fop.bat -xml myxml.xml -xsl myxslt.xslt -pdf outfile. this command line wotks for both versions.

If Stylevision tried to invoke parameters that do not exist on 0.20 the error should be something like: unexistent parameter, or should show you the Usage help. But it's not the case.

So i would be curious to know why it fails.

Greetings,
Fabio
Topic: Problems rendering PDF with fop 0.20.5 and Stylevision 2009
Posted: Wednesday, September 30, 2009 8:13:22 AM
rip wrote:
The xslt is the same,

but check how fop 0.20.5 takes command line arguments, vs how 0.93-0.05 do.

What errors are generated when done from within StyleVision ([Preview PDF], change it to [FO Result], copy paste it here)


These are the errors:

[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[INFO] FOP 0.20.5
[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[INFO] building formatting object tree
[INFO] setting up fonts
[INFO] [1]
[WARNING] Sum of fixed column widths 2600000 greater than maximum specified IPD 0
[WARNING] Sum of fixed column widths 157000 greater than maximum specified IPD 0
[WARNING] Sum of fixed column widths 570000 greater than maximum specified IPD 0
[WARNING] Sum of fixed column widths 441000 greater than maximum specified IPD 0
[WARNING] Sum of fixed column widths 410000 greater than maximum specified IPD 0
[ERROR] unknown font Arial,normal,bold so defaulted font to any
[ERROR] unknown font Arial,normal,normal so defaulted font to any
[ERROR] unknown font Arial,normal,normal so defaulted font to any
[ERROR] unknown font Arial,normal,normal so defaulted font to any
[ERROR] unknown font Arial,normal,normal so defaulted font to any
[ERROR] unknown font Arial,normal,normal so defaulted font to any
[ERROR] unknown font Arial,normal,normal so defaulted font to any
[ERROR] unknown font Arial,normal,normal so defaulted font to any
[INFO] Parsing of document complete, stopping renderer


Greetings,
Fabio

Topic: Problems rendering PDF with fop 0.20.5 and Stylevision 2009
Posted: Wednesday, September 30, 2009 7:51:16 AM
island wrote:
Hi,

Stylevision 2009 does not generate FOP 0.20.5 compliant code. Why are you using 0.20.5 from inside Stylevision and then 0.94 when converting the xml to pdf from the command line? Why do you not use 0.93/0.95 in Stylevision as well?



From command line i use FOP 0.20.5 and it works. So the generated xslt (Vers. 1.0) is perfectly compatible with FOP 0.20.5. I have to use this version of FOP because this is the version i use in production, loaded on an ORACLE Database. I cannot change to FOP 0.94 because loading jars on ORACLE is a nightmare.

My question is: why the rendering with FOP 0.20.5 works if invoked from command line and it fails from inside Stylevision?? The xslt is the same!

Greetings,
Fabio
Topic: Problems rendering PDF with fop 0.20.5 and Stylevision 2009
Posted: Wednesday, September 30, 2009 7:06:04 AM
Hello,

i have a problem rendering PDF from inside Stylevision 2009 using FOP 0.20.5
But if i generate the xslt (XSLT Version 1.0) and invoke FOP from command line, with the same xml file, it works perfectly. The PDF is generated correctly.
Why it gives errors if invoked directly inside Stylevision?

To render correctly i have to use fop 0.94

Greetings,
Fabio

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.