Re: Fw: Word secability on character #176

2012-10-28 Thread J.Pietschmann
Am 24.10.2012 19:15, schrieb Christian Pestel:
 We don't use fophyph.jar, so what is the list of characters which cut
 words ?

Line breaking is primarily done using UAX14, see
 http://www.unicode.org/reports/tr14/
Hyphenation augments this.

 Is this list configurable ?
FOP uses Unicode line breaking properties, which isn't
user configurable at this moment.

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Multi Threaded engine

2012-09-01 Thread J.Pietschmann
Am 31.08.2012 16:11, schrieb Theresa Jayne Forster:
 I was wondering whether
 there was any plans or the ability to quickly scan the external links and
 then using multiple threads to get the images in parallel to reduce the
 download and creation time.

Definitely an interesting idea, but there's nobody working on it. I'll
open a low-priority bug so that it wont be forgotten, I also suspect
if this is properly implemented also local image loading might become
faster.

However, loading remotetly stored images will always be quite a bit
slower than locally stored images. Running a kind of local cache is
highly recommended.

J.Pietschmann


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: How does FOP prints text lines and spaces between words

2012-06-17 Thread J.Pietschmann
Am 15.06.2012 17:04, schrieb Chanaka Amarasekara:
 Just a clearification, let say we align the xml data with a
 perticuler font and a font size from notepad, and we use the same
 exact font and it's font matrix and use the same font and font size
 in a xsl layout. In this case wouldn't the text in the generated PDF
 by the FOP get the same alignmnet as it was in the xml? Will it be
 the same with regardless of unisize fonts or not? If not why?

The very short answer is: TAB expansion, word spacing and, to some
extend letter spacing is NOT standardized, and different layout enines
(as in: notepad.exe and FOP) may place the words at different positions.

Use a table, FO table rendering is standardized and will produce
reproducible layouts.

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Different footer for different page

2012-05-24 Thread J.Pietschmann
Am 24.05.2012 17:57, schrieb Lalatendu Mohanty:
 Hi I have a requirement where each page should have a different
 footer. Basically, each footer will have a different image based on
 the page number. Is this something can be done in xsl-fo using
 fo:conditional-page-master-reference or any other way.

One way to achieve this is to use a new page master for every page:

fo:layout-master-set
  fo:simple-page-master master-name=page1
...
fo:region-after region-name=page1-footer ... /
  /fo:simple-page-master
  fo:simple-page-master master-name=page2
...
fo:region-after region-name=page2-footer ... /
  /fo:simple-page-master
 ...
  fo:page-sequence-master master-name=main
fo:single-page-master-reference master-reference=page1/
fo:single-page-master-reference master-reference=page2/
...
  /fo:page-sequence-master
/fo:layout-master-set

then set the static content for each footer region as you like. If you
expect to get a large number of pages you might have to set up a
generator for all the repeating stuff.

Markers could provide another way to achieve what you want, depending on
the kind of content you have.

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Adding editable text boxes to PDF document

2012-05-24 Thread J.Pietschmann
Am 24.05.2012 12:03, schrieb KEILHOLZ Werner:
 I need to add editable text boxes (actual text boxes with a name, not
 just 'drawn' text boxes) to a PDF document generated by FOP.
 
 The xmlgraphics web site seems to suggest that this is possible using
 extensions, like in the example of adding JAVA script to open a
 search box (
 http://xmlgraphics.apache.org/fop/dev/design/extending.html ).
 
 I did some research and all discussions seem to say that this is
 'impossible'. Didn't anyone ever implement such an extension? Is it
 not possible to create editable forms with FOP?

FOP can't produce editable text boxes in PDF directly. It could be done
using embedded JavaScript, but using a different tool line PDFBox or
iText to post process the PDF generated by FOP is much easier.

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: RC4 and JDK 1.6

2012-05-05 Thread J.Pietschmann
Am 04.05.2012 21:24, schrieb Jonathan Levinson:
 I find that I don't have to set up Bouncy Castle to get -u password
 encryption to prompt for a password.  Can anyone else confirm, that
 with JDK 1.6, Bouncy Castle is not needed, or does FOP apply a very
 weak encryption unless Bouncy Castle or some other RC4 provider is
 used?

The Bouncy Castle Library was mandatory with JDK 1.3, which had only
a very rudimentary crypto implementation. IIRC Java 1.4 already had a
RC4 implementation. I don't think Bouncy Castle is still necessary for
standard PDF encryption tasks.

J.Pietschmann


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Why my footer is overlapped with body content (fo.xml attached)?

2012-04-24 Thread J.Pietschmann
Am 24.04.2012 06:17, schrieb bbg:
 
 http://old.nabble.com/file/p33737389/exampleXmlAndPdf.zip
 exampleXmlAndPdf.zip 
 
 I attached both 1.fo.xml and generated PDF 1.fo.pdf. Could somebody tell me
 what's wrong with my 1.fo.xml, why the footer overlap with the body content? 

Your body region doesn't have a bottom margin. See
 http://xmlgraphics.apache.org/fop/fo.html#fo-region-align
Your top region also overlaps the body.

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: subsequences exhausted in page-sequence-master

2012-03-26 Thread J.Pietschmann
Am 26.03.2012 16:50, schrieb Pravin Chaudhari:
   I am receiving below warnings and error while transforming to PDF using 
 XSL-FO. I m currently using old version of fop.jar. Did we address this issue 
 in fop1.0?
 
 [3/23/12 14:41:09:614 CDT] 003d PageBreakingA W 
 org.apache.fop.layoutmgr.PageBreakingAlgorithm updateData2 Part/page 0 
 overflows the available area in block-progression dimension. 
 (fo:static-content, location: 231/50)
 [3/23/12 14:41:09:729 CDT] 003d PageBreakingA W 
 org.apache.fop.layoutmgr.PageBreakingAlgorithm updateData2 Part/page 0 
 overflows the available area in block-progression dimension. 
 (fo:static-content, location: 231/50)
 [3/23/12 14:41:09:742 CDT] 003d PageBreakingA W 
 org.apache.fop.layoutmgr.PageBreakingAlgorithm updateData2 Part/page 0 
 overflows the available area in block-progression dimension. 
 (fo:static-content, location: 231/50)
 [3/23/12 14:41:09:755 CDT] 003d PageBreakingA W 
 org.apache.fop.layoutmgr.PageBreakingAlgorithm updateData2 Part/page 0 
 overflows the available area in block-progression dimension. 
 (fo:static-content, location: 231/50)
 [3/23/12 14:41:09:764 CDT] 003d PageBreakingA W 
 org.apache.fop.layoutmgr.PageBreakingAlgorithm updateData2 Part/page 0 
 overflows the available area in block-progression dimension. 
 (fo:static-content, location: 231/50)
 [3/23/12 14:41:13:566 CDT] 003d FONodeW 
 org.apache.fop.fo.pagination.PageSequenceMaster getNextSimplePageMaster 
 subsequences exhausted in page-sequence-master 'simpleDocBenefits', using 
 previous subsequence
 [3/23/12 14:41:13:594 CDT] 003d FatalErrorExc E 
 us.mn.state.deed.uitip.framework.log.CommonsLogImpl em Exception occured 
 while an Action was processing: subsequences exhausted in 
 page-sequence-master 'simpleDocBenefits', cannot recover
  java.lang.IllegalStateException: 
 subsequences exhausted in page-sequence-master 'simpleDocBenefits', cannot 
 recover
 at 
 org.apache.fop.layoutmgr.PageProvider.cacheNextPage(PageProvider.java:275)

These are mos likely problems in your XSLFO:

 page 0 overflows the available area in block-progression.
 (fo:static-content, location: 231/50)

This means you've put too much content in a static-content area. If you
think your content hight is the same as the available extent of the
static content area, it is possible that the overflow is due to
round off errors. Unless your output clearly shows an overflow, these
warnings are harmless (but check the output anyway)

 subsequences exhausted in page-sequence-master

This is more serious, it means your body flow generates more pages than
there are pages generated by the page master.
An example: you can have a page master defining exactly two pages

fo:page-sequence-master master-name=foo
  fo:single-page-master-reference master-reference=first-page/
  fo:single-page-master-reference master-reference=next-page/
/fo:page-sequence-master

If your page sequence generates more than two pages, you'll get the
error mentioned above. Check you page master definition accordingly.

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Invalid CSS document

2012-01-30 Thread J.Pietschmann
Am 30.01.2012 22:47, schrieb Li, Jing:
 Dear All,
 
 I was working on a report using FOP which convert a lot of JFreeCharts to svg 
 and render them in PDF.
 
 I got it all working in my intellj development environment.  In the end, I 
 bundle the whole project in one jar using http://one-jar.sourceforge.net/.
 
 But when I run it in one jar, I got the following messages:
 
 Error: SVG graphic could not be built. Reason: org.w3c.dom.DOMException: 
 unknown:
 Invalid CSS document.
 JAR entry 
 lib/batik-svg-dom-1.7.jar!/org/apache/batik/dom/svg/resources/UserAgentStyleSheet.css
  not found in C:\Users\lij40\AppData\Local\Temp\temp0.jar

Just for completeness, check whether
 C:\Users\lij40\AppData\Local\Temp\temp0.jar
contains
 lib/batik-svg-dom-1.7.jar
Even if it's there, the URL resolver probably can't resolve recursive
jar URLs, so you'd either hack up your very own resolver which will
do this, or unpack the onejar after deployment.

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Magically LucidaSansRegular show up

2011-12-21 Thread J.Pietschmann
Am 20.12.2011 03:40, schrieb Rob Sargent:
 I happen to be using a font, StoneSerif (and the ITCStoneSerifCom
 version thereof) which doesn't have many bullet glyphs. For instance it
 is missing the open bullet (x25e6).  Luckily for me fop-1.0 is
 substituting the glyph from LucidaSansRegular, which is in my list of
 fonts.  Just curious how this is being picked up with explicit
 instruction to do so.  Can anyone shed some light on this for me?

See
 http://xmlgraphics.apache.org/fop/1.0/fonts.html#selection
Bullets count as single words and are subject to automatic substitution.

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Speeding up FOP 1.0

2011-11-30 Thread J.Pietschmann
Am 30.11.2011 17:12, schrieb Theresa Jayne Forster:
 On top of that, if I make the images local and not from the 3rd party site,
 the pdf then takes 2.5 seconds 
 
 The images only take 8 seconds to download from the 3rd party site, so why
 is it taking so long?

Network connections are not seekable, and images are likely to be
downloaded multiple times. Network snooping or asking for the server
logs might get you further information, like congestion, timeouts,
or other weird effects which you might get when you let FOP fetch
the images rather than downloading them. Are there SVG among the
images? Look for includes and DTD downloads in this case.

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: FOP not properly working in UNIX environment

2011-11-12 Thread J.Pietschmann
Am 11.11.2011 23:41, schrieb Gabriele Falace:
 This servlet works fine in a Windows environment, but when the web app is
 deployed in a Unix environment I get the following error.
 ...
 It looks like FOP needs some graphics library but it fails to found them.

FOP indeed uses some Java classes which are typically not available on
servers without a graphics environment. This can be resolved by running
the JVM in headless mode, usually by adding -Djava.awt.headless=true
to the JVM command line. Search the web for how to start Weblogic this
way.

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: FOP crashes when encountering character 00AD (soft hyphen)

2011-10-21 Thread J.Pietschmann
Am 21.10.2011 09:44, schrieb mehdi houshmand:
 however, FOP trunk doesn't produce this
 issue, 

Jeremias fixed this some time ago on trunk.

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: FOP 0.20.5 and windows 2008 64bits

2011-09-26 Thread J.Pietschmann
Am 26.09.2011 19:21, schrieb Grégory Roche:
 I have a stylesheet XSL-FO on production with FOP 0.20.5, 
 
 I don't know if I can use FOP 0.20.5 with  windows 2008 64bits ! 

FOP is completely oblivious of the platform. You should however
run a 64bit JVM, which allows more than 2G heap for the JVM.

BTW 0.20.5 is really old and unsupported, you should upgrade to
FOP 1.0.

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Help PCL - FOP

2011-09-19 Thread J.Pietschmann
Am 19.09.2011 13:03, schrieb Everson Rogério:
 I'm generating PCL files with XML and XSL files using FOP-1.0 in Java.
...
 Now, I need to insert more PCL commands in pcl file generated? 
 For example, commands to choose the form that should be used, running macros
 and other things.
 
 Is it possible insert this commands in XML or XSL files? 

Short answer: don't try. There is no easy, documented way to get
arbitrary stuff from the XML/XSLT source into the resulting PCL.

You might have a look at one of the PCL editors out there for
post-processing.

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Extended characters not rendered using FOP 1.0

2011-09-19 Thread J.Pietschmann
Am 19.09.2011 12:56, schrieb mike 675:
 
 Using FOP 0.25, the rarr; (Unicode 2192) symbol was rendered OK in PDF.
 
 After moving to FOP 1.0, the right arrow symbol  is not rendered.
 
 This is my XSL param:
   xsl:param name=body.font.familyHelvetica/xsl:param
 
 Has the way FOP handles extended characters changed since 0.20.5?

There have been a lot of changes between 0.20.5 and 1.0, although
Unicode characters should be displayed properly, provided FOP can
find a font containing a glyph for the character.
Did you get an error or warning message? What does not rendered
mean precisely: is there a blank instead of the arrow, another
character, or is it completely omitted? Does your Helvetica font
contain a glyph for the U+2192 (check with a font viewer or font
editor, if in doubt), or did you override the font locally (with
something other than font=Symbol)
Check
 http://xmlgraphics.apache.org/fop/1.0/fonts.html
and in particular
 http://xmlgraphics.apache.org/fop/1.0/fonts.html#missing-glyphs
for further details.

I also notice that you use DocBook, it may be necessary to adjust
some parameters to tell the style sheets you are using FOP 1.0 now.
You'll probably have to ask on the DocBook Apps list for details.

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Problem with arial font access

2011-09-05 Thread J.Pietschmann
Am 05.09.2011 13:09, schrieb Theresa Jayne Forster:
 How do you determine the font-family name for a font loaded by autodetect?
...
 File names are not always the same

Most Font file viewers (or file managers) can display the real
font name. On Windows (Vista or later), go to the directory
containing the fonts (usually C:\Windows\Fonts or such), and you'll
see the real font names. Right click and select properties from
the context menu, and you'll get the file name and other info. Double
click, and the windows font viewer opens, again displaying the font
name. There's similar functionality on Unix/Linux and Mac. If all
else fails, grab a font editor for your plattform, open the font,
and view the font properties, or meta data.

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: TransformerConfigurationException

2011-08-19 Thread J.Pietschmann
Am 19.08.2011 11:00, schrieb KAMOHELO MOFOKENG:
 I used the same stylesheet that worked on a standalone code, see below:

 xsl:stylesheet version=1.1
   
I guess the xslt processor used by JApplet is thrown off
by this version. Try 1.0

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: strange page break

2011-03-07 Thread J.Pietschmann

On 07.03.2011 01:53, Hahnekamp, Rainer wrote:

Hello everybody,

I have the following simple xml markup that should put an image to the end
of the page. The image is public so can simply copy  paste the code.

For some reason fop generates a PDF file with two pages instead of one. Are
there any hidden default spaces I should be aware of?


It looks like you got the usual half-leading issue: the image is
embedded in a line, which gets some space added to the line height
(default 20% of the font size).
You could add font-size=0 to the block to avoid this issue, although
rounding problems may still cause FOP to produce a line break (reducing
the margin-top to 186.99mm should be safe).

Search the spec at http://www.w3.org/TR/xsl/ for more half-leading
to get more info.


---
?xml version=1.0 encoding=UTF-8?
root xmlns=http://www.w3.org/1999/XSL/Format;
  layout-master-set
simple-page-master master-name=frame page-height=297mm
page-width=210mm margin-top=15mm margin-bottom=15mm margin-left=15mm
margin-right=15mm
  region-body /
/simple-page-master
/layout-master-set
  page-sequence master-reference=frame
flow flow-name=xsl-region-body
  block margin-top=187mm
   external-graphic src=
http://kiga.s3.amazonaws.com/4251-4500/4344/krokuszaehlspieleinfach44d693c7cf29b74d693c7d3e20e.svg;
content-width=80mm
content-height=80mm /
  /block
/flow
/page-sequence
/root
---



J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: AW: ValidationException: Document is empty

2010-12-07 Thread J.Pietschmann

On 07.12.2010 16:39, Georg Datterl wrote:

?xml version=1.0 encoding=UTF-8?
xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
 xsl:variable name=A4_HEIGHT select='297mm'/
 xsl:template match=ROOT
 fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
 fo:layout-master-set
 fo:simple-page-master
 master-name=simple  
page-height=/xsl:text




 xsl:value-of select=$A4_HEIGHT/
 xsl:text disable-output-escaping=yes


That's not how XSLT is supposed to work.
If you want to use a variable for page-height, use an attribute value
template:
 fo:simple-page-master master-name=simple page-height={$A4_HEIGHT}

Google for further details, or buy Michael Kay's book.

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: How to hyphenate nonwords?

2010-11-27 Thread J.Pietschmann

On 23.11.2010 08:30, Alexander Uvarov wrote:

How to hyphenate nonwords? For example i have serial number
ZZ10-SX70-BBQZA in a table cell. Serial might be in any language.
Table cell is small and document looks ugly. Could anyone share
hyphenation rules for such case? I am sure that I am not the first
person with such problem.


First, I think you look for automated line breaking rather than
hyphenation. The latter adds an hyphenation sign, and I don't
think you want this in your serial number.

Second: FOP implements the Unicode line breaking algorithm 
(http://www.unicode.org/reports/tr14/) which was written with

a very common use case in mind: typesetting internationalized
text, mostly in a natural language. Unfortunately, this algorithm
can't deal easily with random innovations in written text, like
URLs or Serial Numbers. OTOH, UAX#14 provides some additional
control in form of the already mentioned Zero Width Space
character (and others), which allow you to put hints for the
line breaking engine into your source character stream. There are
various ways you can do this, for solutions at the XSLT level have
a look at the XSLT FAQ.

Third: If you come up with a more elegant solution, please
discuss it on this list and/or on the XSL list
(http://www.mulberrytech.com/xsl/xsl-list/), where the relevant
gurus tend to hang out.
If you think there should be a FOP extension element to mark
up parts of the flow text to use alternative line breaking rules,
well, spec and code contributions are welcome.

HTH
J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: JEuclid and FOP

2010-11-01 Thread J.Pietschmann

On 01.11.2010 13:20, Peter Hancock wrote:

I am not a windows user and so there may be an environmental reason
you are not have success but I do not think that is likely.


The fop.bat for windows isn't nearly as intelligent as the fop
shell script used on Linux/Unix. In particular, on windows each
jar which has to be included into the classpath gets an explicit
line in the fop.bat, while the shell script automatically includes
every jar it finds in the lib subdirectory. The fop.cmd command
file should also automatically includes every jar in the lib subdir,
but usually the fop.bat command takes precedence.
So in order to so in order to get FOP with JEuclid working on Windows
with the fop.bat command, the fop.bat file has to be modified to
add the JEuclid jars to LOCALCLASSPATH (this should'nt be too hard).
Or just call fop.cmd explicitely:
 fop.cmd mathml.fo mathml.pdf

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: xsl fo errors and line numbers

2010-09-27 Thread J.Pietschmann

On 27.09.2010 21:41, thandana wrote:


Hi All,
  Any help is greatly appreciated. I am using Apache Xalan 2.7.1, FOP .95 to
generate pdf docs. The only issue is when i have an error in xsl-fo
document, i am not seeing line numbers in the error message. What should be
done to get the exact line # in xsl-fo document that is causing the error?

I am using code like this but no use.

transformFactoryInstance.setAttribute(TransformerFactoryImpl.FEATURE_SOURCE_LOCATION,
Boolean.TRUE);


Line numbers are only used in error messages if the FO source
is a file. If the FO is generated by an XSL transformation,
there is no way to trace errors back to the source XML (or
XSLT). A common approach is to run the transformation separately
to generate a FO file, possibly enabling indent=yes on
xsl:output, and process this FO file in a second step. FOP
will generate line numbers referencing the FO file.

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Servlet Container External Graphics

2010-09-12 Thread J.Pietschmann

On 10.09.2010 19:31, CRANFORD, CHRIS wrote:

I am trying to use the external-graphics tag in Apache FOP inside of
a servlet container server (Tomcat).  I want to be able to load the
graphic based on relative paths to the context:

fo:external-graphic src=images/mylogo.gif/


Relative URLs are by default resolved against the URL of the
document where they occur.


In the Web Application server the logo is found in:

  /tomcat/webapps/myapp/images/mylogo.gif


You can try to set the base URL to /tomcat/webapps/myapp/,
see
 http://xmlgraphics.apache.org/fop/trunk/embedding.html#user-agent
Instead of hard coding the path, you can use servlet functionality,
like

http://tomcat.apache.org/tomcat-4.0-doc/servletapi/javax/servlet/ServletContext.html#getRealPath(java.lang.String)

HTH
J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Can Fop handle mutiple input files and name output files dynamically ?

2010-07-19 Thread J.Pietschmann

On 19.07.2010 21:21, soph wrote:


I am converting all xml files in an incoming file folder to PDF files by
FOP. The xml files are delivered from other applications, so I don't know
the names of the xml. I want to name the out put pdf file as
outputFile-TimeStamp.pdf

I tried to use Fop -xml *.xml -xsl StylesheetName.xsl -pdf
outputFile-%date%_at_%time%.pdf , but got
--
SEVERE: Exception
org.apache.fop.apps.FOPException: Don't know what to do with
07/09/2010_at_11:48:04.50.pdf
--

Anybody know what's the problem of my command line?  how to handle mutiple
inputs?


The FOP command line application is designed to take a single input
file. It wont deal with multiple input files.
If you want to process the contents of a directory, you'll either
have to resort to advanced scripting (loops and all that) or you
have to use FOP as a library and write the directory scanning part
in java (see http://xmlgraphics.apache.org/fop/0.95/embedding.html)

J.Pietschmann



-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: problem with embedding fonts

2010-07-17 Thread J.Pietschmann

On 16.07.2010 14:56, Werner Putzhuber wrote:

But: the embedded font has
the Name MyFont-Normal instead of MyFont.


FOP has to disambiguate the entry in the PDF font dictionary, after
all, you could have used the italic variant of MyFont too, which is
a different font.


What happens is that if I copy-paste a section from pdf into MSWord the font
will not be recognized / matched with the installed font (MyFont) on the
testmachine.

...

Can anybody explain this behaviour and maybe offer me a solution?


Some FOP hacking ought to be necessary. It's possible that appending
-Normal for the normal font variant is a bit overzealous.

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Images not found!!!

2010-07-17 Thread J.Pietschmann

On 01.07.2010 11:41, Varra, Mamatha wrote:

fopfactory.setBaseURL(url);

i think its causing problem but i am not sure... we are trying to figure out ...


Quite likely...
Note that 'url' should be an URL, probably starting with file:/// in
your case.


the exact error is org.apache.fop.fo.flow.ExternalGraphic bind Image not found: 
images/emptybox.jpg.


This looks like either 'url' is actually an empty string or something
else went wrong too.

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Unwanted blank lines on creating Text Files

2010-07-15 Thread J.Pietschmann

On 15.07.2010 11:37, Saurabh Thakkur wrote:

I'm generating one plain text (MimeConstants.MIME_PLAIN_TEXT) file.
Where I'm taking the data from the XML and writing it according to
one defined template(XSL)

I'm getting unwanted blank lines on the generated Text file. Same
template works fine for PDF and RTF formats. I'm not getting any
unwanted lines with these formats.


While this is surprising to unsuspecting users, that's the way the
text renderer is supposed to work. The page is basically divided into
a grid defined by the characters-per-inch and lines-per-inch values,
and the positions determined by FOPs layout engine are rounded by the
renderer to the next grid position. If the line height determined by
the layout doesn't match exactly the line height defined by the
renderers lines-per-inch value, empty lines are likely to appear. The
only way to avoid them is to take measures to ensure a constant line
height which matches the renderers lines-per-inch value.
How the renderer's lines-per-inch value is determined depends on the
FOP version. Which release are you using?

(Ow, was it lines per inch or lines per page? Anyway, the effect is
the same.)

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: FOP, hypenation. How to compile hyph pattern? my own

2010-06-09 Thread J.Pietschmann

On 08.06.2010 14:56, lexa2009 wrote:

, so i have su.hyp in fop_dir\build\classes\hyph

...

i have xsl-fo with this block
fo:block text-indent=0.5cm hyphenate=true language=en


If your hyphenation file is named su.hyph, you should try
 language=su
instead (even though 'su' isn't a valid ISO language code).
Have a look at the hyph/readme file.

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Java Heap

2010-06-09 Thread J.Pietschmann

On 09.06.2010 16:57, Andrey Skrypnik wrote:

I'm using FOP 0.95 i when i try to generate a big file i received:

SEVERE: Servlet.service() for servlet meritservus threw exception

java.lang.OutOfMemoryError: Java heap space


See
 http://xmlgraphics.apache.org/fop/0.95/running.html#memory

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: FOP, hypenation. How to compile hyph pattern? my own

2010-06-09 Thread J.Pietschmann

On 09.06.2010 22:11, lexa2009 wrote:


ops, i am sorry. i use language=su, but do not work. i test also with
english standart hyph pattern(en.hyph), but it also do not work. here was my
mistake that i type en instead of su


You wrote

than i use

ant compile-hyphenation

, so i have su.hyp in fop_dir\build\classes\hyph
i put this file to fop_dir\hyph and use

ant jar-hyphenation

so i have fop-hyph.jar in fop_dir\build, i place it to fop_dir\lib and try


The 'ant jar-hyphenation' gets the *.hyp files from
fop_dir\build\classes\hyph, if you moved the su.hyp file, the
jar could be empty, check whether the hyp file is in
the jar (use jar -tvf fop-hyph.jar).

J.Pietschmann


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: FOP, hypenation. How to compile hyph pattern? my own

2010-04-30 Thread J.Pietschmann

On 30.04.2010 09:38, lexa2009 wrote:


i try Check Installation in http://ant.apache.org/manual/install.html
all work good. i go to fop.0.95 directory in cmd and write C:\fop-0.95ant
ant compile-hyphenation
Unable to locate tools.jar. Expected to find it in C:\Program
Files\Java\jre6\li
b\tools.jar
Buildfile: build.xml does not exist!
Build failed

i have this error. last post i use my own build.xml which i find in fop
directory. it was my mistake.

i google and find that  tools.jar do not need for hyph, so i can ignore this
message. but why i have error Buildfile: build.xml does not exist! ?


The error messages comes from ant which tries to load its built-in
tasks, and some of them use tools.jar from the JDK.
Either get a full JDK and point the JAVA_HOME there rather than to a
JRE, or use command line based on the following in your FOP directory:
java -classpath build/fop.jar;lib/commons-logging-1.0.4.jar
   org.apache.fop.hyphenation.SerializeHyphPattern hyph hyph-dest
Undo the linebreak, maybe adjust the directory and filename of the
FOP jar, and you may also have to change the java command into
jre depending on what you have installed. The hyph is the directory
your hyphenation pattern file is in. If you get errors about missing
classes, guess and add the appropriate jar which should be in the lib/
directory (I can't test this right now).

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: fox:external-document not showing all pages

2010-04-29 Thread J.Pietschmann

On 29.04.2010 19:31, John Brown wrote:

I still believe that the
difference must be in the FOP installation on the machines. If you
are sure that both machines are using:

1) The same version of FOP

[etc.]

JRE vendor and version and in some cases even the OS
may be relevant too. In particular JREs on Linux tend
to have weird bugs which had caused FOP to malfunction
for some input in the past.

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Making frontpage in docbook

2010-04-18 Thread J.Pietschmann

On 09.04.2010 10:34, Rijaa wrote:

I was trying to make front page in docbook one month ago, but i dont
find the solution yet!


You'll probably have more luck on a list dedicated to DocBook,
try docbook-a...@lists.oasis-open.org first.

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: insight into page-sequence for even page must always contain an image

2010-02-27 Thread J.Pietschmann

On 25.02.2010 13:14, Mario Madunic wrote:

I don't understand what I should read the user policy as I'm using
FOP and my question does pertain to FOP and FO? Please explain.


Well, you posted DocBook-like XML therefor I thought you
looked for a solution at the DocBook customization or
input level.

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Text Renderer

2010-02-24 Thread J.Pietschmann

On 24.02.2010 21:51, Thomas Peterson wrote:

Is it possible to render text along a path?


Which context? XSLFO doesn't deal with this kind of things.
You can try to embed a SVG, see for example:
http://www.informit.com/articles/article.aspx?p=31799seqNum=2rll=1

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: insight into page-sequence for even page must always contain an image

2010-02-24 Thread J.Pietschmann

On 24.02.2010 20:07, Mario Madunic wrote:

Sitting here trying to come up with how to handle a sequence of pages
where the even page must always contain an image.

[snip]

I think you have a better chance for helpful replies on the
DocBook mailing list
 http://wiki.docbook.org/topic/DocBookMailingList

See also
 http://xmlgraphics.apache.org/fop/maillist.html#fop-user-policy
for this mailing list.

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: How to:fo:block-container left=xsl:value-of select=string-length(text)/

2010-01-24 Thread J.Pietschmann

On 24.01.2010 23:09, Magdikova wrote:

yes, thank you, but how can I set measurments? like cm or pixel?


Either add to the attribute value as text:
 fo:block-container
xsl:attribute name=leftxsl:value-of
 select=string-length(text)/mm/xsl:attribute
   ^^
or (easier to read)
 fo:block-container
xsl:attribute name=left
  xsl:value-of select=string-length(text)/
  xsl:textmm/xsl:text
/xsl:attribute

or use an attribute value template (the braces below)
 fo:block-container left={string-length(text)}mm

In case of further question regarding XSLT, check the
XSL FAQ first (and perhaps take a look into Michael Kay's
book)
 http://www.dpawson.co.uk/xsl/

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: disable-output-escaping in Apache FOP

2010-01-23 Thread J.Pietschmann

On 23.01.2010 06:54, Aish wrote:

I need to create pdf file for xml. I did it through xsl. when i transformed
xml to fo using saxon processor, i had no problem in
disable-output-escaping=yes attribute. But when i executed the file using
FOP.bat in command prompt(say Fop -xml sample.xml -xsl sample.xsl -pdf
sample.pdf) its throwing error.


The disable-output-escaping=yes attribute has only an effect if the
result of the transformation is serialized as XML.
If you use the Fop -xml sample.xml -xsl sample.xsl -pdf sample.pdf
command, the result of the transformation is not serialized, instead
it is piped as a kind of events to the FO processor. Because there is
no serialized output, there is no way to disable output escaping.

Using disable-output-escaping=yes is a bad idea anyway, and can be
avoided in general. Check the XSLT FAQ
 http://www.dpawson.co.uk/xsl/sect2/N2215.html

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Using/Embedding fonts with FOP

2010-01-11 Thread J.Pietschmann

On 11.01.2010 16:13, Ari Army wrote:

 
metrics-url=file://C:/dev/fop/config/font-metric-files/arial_black_ttf.xml
 embed-url=file://C:/dev/fop/config/fonts/ariblk.ttf


Technically, these are not valid file URLs. Try
 metrics-url=file:///C:/dev/fop/config/font-metric...
   ^^^ three slashes here

and check whether your problem goes away.

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Performance isssue in Unix Environment

2010-01-06 Thread J.Pietschmann

On 29.12.2009 09:53, SUNDARAKSHI wrote:

When it was deployed in the windows environment it was fast no issues in the
performance.
But the same code is deployed in unix environment it's taking too slow to
generate the single page pdf.
for the single page it's taking five minutes. What could be the problem?


The problem is most likely the Java runtime environment. It isn't
uncommon that even a JRE for unix from the same vendor and on the
same hardware performs worse than a JRE on windows.
There are zillions of other possible reasons as well, ranging from
configuration errors to simply less capable hardware.

J.Pietschmann


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Linebreaking question

2009-11-30 Thread J.Pietschmann

On 30.11.2009 15:18, Georg Datterl wrote:

I have a (simplified) table, one cell with one text string.

 The cell width is restricted to less than the text would need,
 but the text, as you can see below, contains an ordinary blank.
 So I would expect two lines but I get one line with text growing
 out of the cell. Inserting a zero-width-space leads to a break.
 Is there a reason for this behaviour?
...

fo:inline0.07 ...0.08/fo:inline


Well the Table 2 in UAX#14 (http://www.unicode.org/reports/tr14/)
has NU^IS, i.e. no break between a number an a numeric punctuation
even if there is a space in between, apparently due to LB13.

There is always a break opportunity after a ZWS, so inserting one
is the universal work around for getting line breaks.

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Head of chapters

2009-11-29 Thread J.Pietschmann

On 29.11.2009 12:46, Faehndrich Philippe wrote:

In a book, I wish to have the title of the current chapter printed on the top
of each page. But I don't want it on the first page of each chapter.

I can't find the condition with which I could do this in a
fo:repeatable-page-master-alternatives. «page-position=first» works only
for the very first page of the book, i. e. the title page.


A neat trick is to print the chapter title on every page, and
print something on top of it in order to obscure it on the
first page of the chapter, usually a white SVG graphic in a
block-container.

Anyway, why don't you use a separate page sequence for every
chapter?

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Head of chapters

2009-11-29 Thread J.Pietschmann

On 29.11.2009 15:32, Faehndrich Philippe wrote:

Isn't it, the opposite way, the same problem? Don't I must call a different
page-master for the first page of each chapter?


No, I meant using markers. There are several ways to get
what you probably want. The following might work (beware,
untested!):
 fo:static-content ...
   fo:retrieve-marker retrieve-class-name=chapter-title
 retrieve-position=first-starting-within-page
 retrieve-boundary=document/
  ...

 fo:block
   !-- first an empty marker --
   fo:marker marker-class-name=chapter-title/
   !-- now  with the title text for subsequent page headers --
   fo:marker marker-class-name=chapter-titleThe Chapter
Title/fo:marker
   !-- now the title text for the flow --
   The Chapter Title
 /fo:block


Anyway, why don't you use a separate page sequence for every
chapter?


I must then find a solution for page numbering...


I don't understand why this poses a problem. Did you try
initial-page-number=auto?

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: New experimental hyphenation patterns

2009-11-27 Thread J.Pietschmann

On 26.11.2009 09:56, Simon Pepping wrote:

hyphenation code=de use=de_1901/


Yes.


I'm a bit behind on the hyphenation front, but I thought the kind
of classes used in TeX hyphenation patterns aren't of much use
if the patterns use Unicode. There is a Unicode standard for
parsing words out of text:
  http://www.unicode.org/reports/tr29/#Word_Boundaries
aren't we using this already?


We do not use that. It is my impression that classes are required for
being able to build the hyphenation tree. Is that not so?


Well, I looked it up. Classes are used to map several code points
like upper/lower case of a character to a single character for
the hyphenation pattern, a kind of normalization.

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: [DEBUG] Last page-sequence produced 3 pages.

2009-11-25 Thread J.Pietschmann

On 25.11.2009 20:56, Pardha Paruchuri wrote:

I have a WordML file that I am trying to convert into PDF using FOP 0.20.5, is 
giving below error.

...

Caused by: java.lang.ClassCastException
For FOP 0.20.5, this usually indicates a violation of the XSLFO schema; 
a common

case is producing inline FO elements or text as direct child of a flow.

There isn't much more to say without having a look at your inputs. You
can try to run your XML/XSLT through FOP 0.95, which should give you
an informative error message rather than a JAva exception. Switching
to 0.95 is recommended anyway.


when I ran in debug mode it is showing this message '[DEBUG] Last page-sequence 
produced 3 pages'.

That's just an information, no error.

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: New experimental hyphenation patterns

2009-11-25 Thread J.Pietschmann

On 25.11.2009 21:40, Simon Pepping wrote:

When a language uses various alternative spelling rules, some
descriptive suffix is appended to the file name, e.g. de_1901; users
who prefer these pattern files over the default ones will have to
rename the pattern files in the jar file.


Hmm. I'd rather invent a FOP configuration for mapping the language(s)
given in the FO to hyphenation pattern names.


Classes: ...  Since 3 September 2009 these classes are built into
FOP.


I'm a bit behind on the hyphenation front, but I thought the kind
of classes used in TeX hyphenation patterns aren't of much use
if the patterns use Unicode. There is a Unicode standard for
parsing words out of text:
 http://www.unicode.org/reports/tr29/#Word_Boundaries
aren't we using this already?

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Problem using attributes with xsl:value-of select=/

2009-11-24 Thread J.Pietschmann

On 24.11.2009 03:28, Glen Mazza wrote:

   Fop fop2 = fopFactory.newFop(MimeConstants.MIME_PDF, outStream2);
   Result res2 = new SAXResult(fop2.getDefaultHandler());
   t.transform(rptSource2, res2);


Hmm, Transformers can't be reused, perhaps you should get a new
instance here?

Another possible problem:

atts.addAttribute(, , reportId, , 123);


The method declaration is:
 addAttribute(String uri, String localName, String qName, String type,
   String value)

You are setting the local name to , which may  cause hiccups.
Try any of the following:
 atts.addAttribute(, reportId, reportId, , 123);
 atts.addAttribute(null, reportId, reportId, , 123);
(Actually, I have no idea which one should work, may even be
implementation dependent).

HTH
J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Problem using attributes with xsl:value-of select=/

2009-11-21 Thread J.Pietschmann

On 20.11.2009 23:54, Glen Mazza wrote:

Hello, I'm having difficulty gettingxsl:value-of select=/  to work with
attributes

...

batch myattval=

...

   xsl:template match=batch
   fo:blockxsl:value-of select=@myattval//fo:block
   fo:blockxsl:value-of select=./@myattval//fo:block


Both approaches work for me (the first is the canonical one).

I suspect your original problem is somewhat different, common
problems are misspellings, wrong context and namespace confusions.
You might get more help if you cutpaste the actual xml and
xslt code into the mail.

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: PDF with Bengali (Unicode) characters

2009-10-27 Thread J.Pietschmann

On 27.10.2009 10:40, ranil wrote:

I'm tiring to create a PDF with Bengali (Unicode) characters.  When I try to
create the PDF the placement of the characters in the words are wrong. Right
set but wrong order. But it work fine for RTF creation.


IIRC Bengali has letter combinations where the second letter is
rendered to the upper left of the first. FOP doesn't now about
this kind of placement, it puts these characters in the same
order (and baseline alignment) into the result as they were
in the XMLFO source. Apparently the RTF renderer you used
did know how to render these letters correctly, while your
PDF viewer didn't. What tool did you use to view the PDF
and the RTF? (MS Word on XP or later is known to be good enough
for CTL for Bengali)

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Suppress Hyphenation inside a block

2009-10-19 Thread J.Pietschmann

On 19.10.2009 16:55, JPee wrote:

hyphenation-remain-character-count=2text.fo:inline
hyphenate=falseexternal-linklink/external-link/fo:inline  text


You can't disable hyphenation on an inline, but you can test
whether
fo:inline keep-together.within-line=always
 external-linklink/external-link/fo:inline
will do the trick.


J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: fop: problem with dyn:evaluate

2009-10-05 Thread J.Pietschmann

On 03.10.2009 21:30, KrisKom wrote:
[snip]

I used xsl:for-each to loop over RoleTypes/* elements to define table
columns, and then
dynamically constructed XPath expression (using dyn:evaluate of exslt) to
obtain data for
the cells that correspond to the roles (dev, qa, and doc).

My xsl stylesheet works as expected if I run it through a pro-processor
(xsltproc) to generate
.fo, and then use fop to convert this .fo into a pdf. But, when I use fop
directly (i.e. single step: fop -xml
blah.xml -xsl blah.xsl -pdf out.pdf), I'm getting weird results - only the
first column's data (i.e. the first
sub-element of 'RoleTypes', in this example - 'dev') and rest of the colums
are blank.
Is this a bug with fop (as it seems to recognize dyn:evaluate, but doesn't
do a complete job)??


FOP uses the default XSLT processor from your Java installation.
Chances are, it doesn't recognize certain EXSLT constructs.

You can try to use the XSLT function system-property() to check
what kind of processor is used, e.g.
 xsl:value-of select=system-property('xsl:vendor')/
should give you a hint, looking up other, vendor specific properties
might get you further.
You can use other Java based XSLT processors with FOP, simply get the
necessary jar files, add them to the CLASSPATH, and set the java system
property javax.xml.transform.TransformerFactory to the processor's
transformer factory class.

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: force wordbreak

2009-10-05 Thread J.Pietschmann

On 05.10.2009 14:22, Georg Datterl wrote:

Probably the only thing you can do is insert zero-width spaces.


Hmm, I've pondered crafting hyphenation patterns for URLs for
some time.
Q: Where should breaks in an URL occur? Only after '/' and ''?
This may leave URLs with large fragment Ids unbroken, which are
unfortunately quite common.

Once the patterns are there,
 fo:block language=url hyphenation-character=zws;...
should work nicely. OTOH, hyphenation properties are block
level only, which will have the side effect of not hyphenating
natural language around the URL ...

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Testing custom font

2009-09-18 Thread J.Pietschmann

On 18.09.2009 06:10, J D wrote:

Is there any other way I can enter Japanese characters into the xml file so
that I can test the new metrics file that I have created.


Look up the code point number of some characters which should
be in the font (using e.g. the character map application or
the tables from unicode.org), load the file into a text editor,
and type in the characters as XML character references, e.g.
e.g. #x4e68; (including the semicolon) should result in
the ideogram for child (hopefully).

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Newbie question

2009-09-04 Thread J.Pietschmann

On 04.09.2009 15:22, Dola Woolfe wrote:

(Sounds like more than the 1 hour  I was allocating for it.)


PDF as a format isn't meant to be parsed for advanced text processing,
it was designed for presentation. PDF generators could make your job
of parsing text out of the file arbitrarily hard. As an extreme (and 
rather theoretical) example, a PDF could contain two text streams

Tiset and hsiatx, with embedded positioning commands, which
reads on the screen as This is a text. In any case, even putting
up reasonable guards against running into out-of-order text blocks
will take a few days, unless you find a ready-to-use library for
this task (no, I don't have pointers).

If you can, try to get your source text in a more processing-friendly
format, like DocBook XML.

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Sobtotal per Page

2009-07-16 Thread J.Pietschmann

On 16.07.2009 18:11, Carsten B. wrote:

i searching about 2 days now. I need a subtotal on each page.


That's known to be a difficult problem.


 fo:marker marker-class-name=title
 xsl:value-of select=$totalsum/
 !--- I need the subtotal on at this place ---
 /fo:marker

Here's the rub: the transformation stage and the formatting
stage are two separate processes. There is no way the
transformation can know which positions are put on a page
by the formatting process, and the layout process can't add
up numbers. That's the way it is.

You can try one of the following approaches:
- If the positions all take up the same vertical space, e.g.
 a single line or two lines, you can paginate them in the
 transformation (look up grouping by position), and you
 can calculate the subtotal in the transformation.
- You can use a two pass approach: run the whole process using
 fixed dummy subtotals, extract the positions on the pages
 from the result, then run the process again with a
 transformation with explicit pagination. The area tree output
 or the new intermediate format (trunk only) make it relatively
 easy to get which positions are on which pages.
- Run the transformation using fixed dummy subtotals, then use
 the intermediate format (trunk only) to hook in some
 additional code which calculates the real subtotals and replace
 the dummy values. You will probably have to do some extended
 magic to get the numbers right aligned.

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Fop Trunk Fails to Build (Linux, Ubuntu 9.04, x86_64, jdk1.6.0_14)

2009-06-16 Thread J.Pietschmann

On 16.06.2009 13:53, Andreas Delmelle wrote:

As to your initial problem: like Vincent, I've never run into
memory-related issues while /compiling/ FOP.


I had difficulties running the JUnit-Tests included in the
default ant target, and I always run out of memory while
building javadocs on debian-amd64 using any sun jdk I tried.
Gcj was worse, it usually failed already at the codegen target
with rather strange errors (e.g. illegal character in XML
file WTF?) Maybe this is fixed now, I haven't tried for a
year or so.
I never had this kind of problems while building FOP on
Windows.

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: FOP and XML catalogs

2009-06-10 Thread J.Pietschmann

On 10.06.2009 13:51, David Holden wrote:

so far I've added resolver.jar to the the classpath and added

-Dxml.catalog.files=/usr/share/sgml/xhtml1/xmlcatalog
-Dxml.catalog.verbosity=99 -Dxml.catalog.prefer=public
-Dxml.catalog.relative-catalogs=yes to the command but with little success.


You'll have to tell the XML parser to use the custom EntityResolver.
Unfortunately, there doesn't seem to be a standardized way to do this
without writing java code. Try searching e.g. the Java documentation
whether there are system properties or something to set the entity
resolver for the built-in XML parser, or if all else fails, hack
yourself a FOP wrapper.

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: How to draw vertical line between columns in region body

2009-06-04 Thread J.Pietschmann

On 04.06.2009 21:26, MaheshR wrote:

My problem is that if I have span=none, I want to draw vertical line
between columns.


The commonly suggested solution is to use a background image
for the body region. You can try to use an SVG instead of
a bitmap image. If you have a span=all block, you should
give it a white backgound image in order to mask the vertical
line for this block.

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: offo hyphenation with exceptions

2009-05-18 Thread J.Pietschmann

On 18.05.2009 17:16, Georg Datterl wrote:

but in any case, the exceptions are not honored


Last time I looked FOP didn't even read the exception
section (IIRC this concept was taken from TEX but
never implemented).

J.Pietschmann

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: PDF Result - a few questions.

2008-11-27 Thread J.Pietschmann

On 27.11.2008 15:35, Marcin Prączko wrote:

I am using fop 0.93, and most things are working well (I can generate
PDF documetn). But I have a few problems.

1. Images for warning, note, are extrymly big. I am using the same
images like on HTML output, and on HTML
site is OK but in PDF is quite BIG:

This is probably a problem with the default image resolution
hard coded in FOP 0.93. Upgrading to the latest FOP release
may fix this, or not. I suppose the image files come from
docbook, in which case asking on the docbook-apps is more
likely to get an answer than here.


2. I attached some text files to my document and the font is big as
well, I would like to have smaller font, how
can I do that.
3. The same for fonts for chapter, section, etc - how to make them smaller.


These appear to be questions for docbook gurus. You should ask
on the docbook-apps list for help.

[snip]

J.Pietschmann

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



Re: Problem in Creating PDF with jars

2008-11-27 Thread J.Pietschmann

On 27.11.2008 14:11, sushilmuppidi wrote:

java.lang.IncompatibleClassChangeError: Implementing class


The most likely reason is that you have another, incompatible
FOP jar in the classpath. If you are using FOP in an application
server, look also into the other application installed there, as
well as the directories which implicitely inject jars into the
classpath, and remove all but one instance of the FOP jar.

J.Pietschmann

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



Re: Thai Hyphenation Pattern

2008-08-20 Thread J.Pietschmann

Darren Munt wrote:

I haven't read the whole thing, but that seems to indicate that Thai is
all too hard.


Basically correct. You'll need a morphological analyzer and
probably a lexicon and to locate word boundaries for proper
line breaking.
However, Pango already has it
 http://www.pango.org/Introduction?highlight=(thai)
unfortunately not all that prominently documented. I haven't
had time to analyze what they do in detail. If you could take
a look at it...

J.Pietschmann

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



Re: Experiencing a change in table/page breaking behavior from 0.94 to 0.95

2008-08-20 Thread J.Pietschmann

Andreas Delmelle wrote:

I'm just curious. Going from 0.94 to 0.95, was FOP changed to be more
XSL-FO compliant and that caused the behavior change I experienced?


I think so.


Correctly. With hindsight, there should have been a warning
in earlier releases that a keep-*.within-line was set but
wouldn't have an effect. Alas!

J.Pietschmann

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



Re: Long text inclusions that don't break anymore with FOP 0.95

2008-08-20 Thread J.Pietschmann

Cheri Dennison wrote:

I'm upgrading to FOP 0.95 from 0.20.5 and from 1.70.1 to 1.74 for the
DocBook stylesheets.

[snip]

With FOP 0.95/1.74.0 stylesheets, any long code snippets that normally break
correctly across multiple pages no longer occupy multiple pages. Instead,
the code snippet tries to be on a single PDF page (bleeding into the
header/footer). If it’s longer than the full page, the top part and bottom
part of the snippet gets cut off and is not displayed. If I just copy the
code directly into the XML instead of xincluding it, it breaks fine across
pages as expected.


This is most likely a problem with the DocBook processing, maybe in
combination with changes in the behavior of FOP.  I vaguely remember
you'll have to set some DocBook customizations in order to adapt the
DocBook processing to the latest FOP release.

You are more likely to get an answer if you ask on the docbook-apps
list.

J.Pietschmann

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



Re: Logging question

2008-08-20 Thread J.Pietschmann

Brian Trezise wrote:

Using FOP 0.95, I'm generating a single-page PDF document in a web server,
and it's taking nigh on 20 seconds to generate.  When I prototyped this it
was running  1 second.  The only difference is that when I prototyped I
generated the Source object from a File, and on the webserver I'm pulling it
from a runtime-generated org.jdom.Document that I converted to a
ByteArrayInputStream.

I have a suspicion that a part of the problem is that for some reason using
the ByteArrayStream as an input I'm getting thousands of lines in my log
file.

Very unlikely.

The problem is probably here:

20 Aug 2008 15:46:58,937 - No route found!


I suspect you include a DTD in your SVGs, FOP tries to
load the DTD from the w3c web server, but a firewall or
something blocks this, and FOP waits for the network stack
timeout.
You can check this if you can log in onto the server and
try a ping or traceroute to www.w3.org.

You can try the following solutions:
- Write or get an EntityResolver which provides an empty DTD,
 or the SVG DTD from local storage (if you rely on the declaration
 of the xmlns:svg in the DTD), and set this on the XML parser you
 use for the SVGs. The details are somewhat gory but you should
 find them in the mail archives.
- Remove the DOCTYPE from your SVGs (don't do this if you rely on
 the declaration of the xmlns:svg in the DTD)
- Ask the network staff to unblock access to www.w3.org (not
 recommended)

J.Pietschmann

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



Re: Thai Hyphenation Pattern

2008-08-19 Thread J.Pietschmann

Darren Munt wrote:

Can anyone tell me if there is a Thai hyphenation pattern available,
either for the very old version of FOP v0.20.3, or the latest release
which I am hoping to upgrade to soon?


There is no Thai hyphenation pattern file available,
and because typesetting Thai is difficult in general,
it is unlikely there will be one soon. Unless there
is someone with enough of an itch and either well enough
knowledge of Thai and/or skill to port the Pango code.

Note that FOP can't do proper line breaking for Thai yet
even though it implements UAX#14.

J.Pietschmann

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



Re: Use only a limited number of items in an xsl:for-each

2008-08-18 Thread J.Pietschmann

Brian Trezise wrote:

I'm using the following to select a subset of items from my xml document to
be rendered to the pdf; however when I run fop on the xslt/xml, nothing is
rendered at all:

xsl:for-each
select=//*[local-name()='intellispec/aliases/alias'][position()lt; 3]
xsl:value-of select=./
/xsl:for-each


From what I can tell this is valid xslt code,


Well, 'intellispec/aliases/alias' is not a valid element name, which
means nothing will be selected.


is there another way I need to
write this to be compatible with FOP 0.95?


You have an XSLT question. This is best asked on the XSL list:
 http://www.mulberrytech.com/xsl/xsl-list/
In order to get help, you also need to describe what you want to
do.


If I
just do select=intellispec/aliases/alias in the above for-each all three
aliases print out as expected.


That's the way it should be done. Why do you think you need the much
more complicated (and brittle) form further above?

J.Pietschmann

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



Re: FOP - FONTS - expl. verdana

2008-08-06 Thread J.Pietschmann

lmhelp wrote:

That's a very --original way to specify a pathname containing a space.
I don't think I've ever seen that before. Does Windows even accept it?

I do not know if you are joking or not but Windows unfortunately does.


That's a common confusion: Most Windows programs interpret quotes
in command lines, config files, registry keys and similar places
where whitespace may be significant as a parameter separator. This
is similar to the interpretation of quotes by the Unix shell.
This doesn't make the quotes part of the pathname, nor does it
indicate that the mechanism can be universally applied.

J.Pietschmann

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



Re: Embedding fonts

2008-07-02 Thread J.Pietschmann

Thomas S. wrote:

I have a problem with embedding fonts while running Apache FOP within a
web application. This seems to be caused by a problem with reading the
font metrics from a jar file.


Which FOP version are you using?


java.lang.RuntimeException: Cannot load font: failed to create Source from
metrics file
jar:file:/var/lib/ [snip]
The embedded file URL ist malformed, maybe the recursive URL resolver 
doesn't like this. Try jar:file:///var/lib/... and check whether this

helps.

J.Pietschmann

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



Re: Include a complete file in FOP

2008-06-19 Thread J.Pietschmann

jantje wrote:

So, in PDF I want to show the complete content from file.xml, so also the
elements and attributes.


I suppose you want to have the content of file.xml rendered as
kind of XML source code. Well

 But this does not seem to work.

The standard answer to this phrase is: What do you mean by
does not work? Did you get an error message, and if so,
what did it say?
In your specific case, there are multiple probles in your XSLT:


   xsl:template match=includeXmlFile
 xsl:variable name=source
   xsl:value-of select=string('../../../')/
   xsl:value-of select=path/
   xsl:value-of select=file/
 /xsl:variable

It is better to write this as
 xsl:variable name=source select=concat('../../../',path,file) /


 xsl:for-each select=document($source)

The document() function returns a single node, the root node
of the document, therefore the for-each doesn't do much (except
context switching).


 xsl:copy

This copies the document root node, which isn't very useful.


xsl:apply-templates select=node()|@*/

This starts traversal of the XML tree read from file. I guess
you just got the text from the file in the PDF, without the
tags, which is the result of recursively applying the default
template.

If you want to get the file content as XML source, you have to
render it yourself as text. If you use an XSLT 1.0 processor, you
can search the XSLT FAQ or the XSL list archives for code doing
this (there were multiple publications in the past). This wont
give you an exact copy of the sourec XML, because some information
is lost during XML parsing. If you can preprocess the XML file using
another tool, you can enclose the content in a CDATA section. An
XSLT 2.0 processor has the capability to read text files unparsed,
which is another possibility.

J.Pietschmann

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



Re: FOP PDF problem

2008-05-28 Thread J.Pietschmann

[EMAIL PROTECTED] wrote:

I have a clean install of Eclipse Version: 3.3.2

I have added FOP Bridge 2.1.1 (Apache FOP 0.93.0)

When I try to Render my simple fo XML I get

Beginning render for FOP3.pdf
Parsing of document complete, stopping renderer


This indicates that FOP successfully rendered the PDF.


Total time used: 31,795,661ns
java.lang.reflect.InvocationTargetException
at
org.eclipse.jface.operation.ModalContext.run(ModalContext.java:350)
at
org.ahmadsoft.foprocessor.ui.dialogs.RenderProgress.run(RenderProgress.j
ava:315)

[snip]

I'd say there's something wrong with the FOP Bridge.

First, check whether a PDF file was created and contains the expected
content (if indeed a file was about to be created). There could be
a temporary file somewhere.
Second, ask the FOP Bridge people about the exception. Maybe there
is something incompatible with Eclipse 3.3.2.

J.Pietschmann

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



Re: Getting hyphenation to work

2008-05-28 Thread J.Pietschmann

paul womack wrote:

Kamal Bhatt wrote:

Thanks. Works a treat. One more question, where can I get these
hyphenation files for asian languages (such as japanese).


I'm far from sure hyphenation is even a valid concept
in Japanese.


Well, digging around:
 http://marc.info/?l=fop-devm=102992807207069w=2
While this is mostly about line breaking, hyphenation may happen under
certain, apparently very rare circumstances. Some more info is in the
wikipedia:  http://en.wikipedia.org/wiki/Kinsoku_shori
I wonder whether the rules there are reflected in the Unicode line
breaking properties, which would mean that FOP 0.95ff would handle
this properly.


A quick Google search also turns to a book Understanding Japanese
Information Processing which mentions hyphenation in Japanese.

J.Pietschmann

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



Re: output xml structure with xsl?

2008-05-21 Thread J.Pietschmann

maxmus wrote:

I am looking for a way to translate an xml-file 1:1 to pdf,


In general, there is no way to do this with XSLT, because
the XSLT processor doesn't get all the lexical structure.
For example, the XSLT processor doesn't know about the
sequence of XML attributes, or the number of whitespaces
between attributes, or whether a particular attribute
was delimited by single or double quotes.
If you can live with a kind of canonicalized rendering of
the XML, you can write yourself a text renderer in XSLT,
roughly like

xsl:template match=*
  xsl:textlt;/xsl:text
  xsl:value-of select=name()
  xsl:if test=@*
xsl:text /xsl:text
xsl:apply-templates select=@*/
  /xsl:if
  xsl:textgt;/xsl:text
  xsl:apply-templates/
  xsl:textlt;//xsl:text
  xsl:value-of select=name()
  xsl:textgt;/xsl:text
/xsl:template

(complete it with templates for attributes, text, processing
instructions and XML comments)

If you can use other tools to manipulate the XML file, use
a stream edit to wrap your XML in a CDATA construct (a proper
implementation would also escape any ]] string in your XML,
but doing this properly becomes somewhat messy).

J.Pietschmann

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



Re: MalformedURLException when using relative paths

2008-05-21 Thread J.Pietschmann

Ted Young wrote:

Yes, it supports relative, but relative URLs not relative file paths.  So,
what you want it:
file:pdf_test


Everything starting with file: (or anything else which looks like
an URI scheme) is by specification an absolute URL. The string
file:pdf_test is not a valid URL at all, although some libraries
will try to interpret it the way you do. I'm not sure whether FOP
does it, and I'm too tired to check the URI resolver class right
now.

J.Pietschmann


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



Re: Making a Large Dictionary

2008-05-18 Thread J.Pietschmann

Andreas Delmelle wrote:

I'm not 100% certain, but I think using i-f-o currently means that
inserting the same SVG 1000 times would lead to 1000 separate SVG DOMs
as foreign nodes in the FO tree (?)


I think so. The advantage is that these should be reclaimed once the
page sequence ends, while the SVG used by external-graphics persists
in the image cache.
Therefore: If it is possible to break up the document in many small
page sequences (without cross references), and processing time is
not much of a concern, then using inline-foreign-object should be
an advantage, otherwise external-graphics is probably better.

In any case, I'm always amazed by the applications people find
for XSLFO in general and FOP in particular.

J.Pietschmann

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



Re: Page bottom padding

2008-05-05 Thread J.Pietschmann

Vangelis Karageorgos wrote:

Is page bottom padding possible to materialize in FOP, while constructing a
layout with several columns and flow from one onto another?


Another wild guess: If you mean you want to have the columns
balanced, add an empty column spanning block after the content
(using span=all).

J.Pietschmann

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



Re: XML to PDF (embedded) images paths

2008-04-20 Thread J.Pietschmann

bonekrusher wrote:

I have an XSLT that creates my PDF. Myfo:external-graphic  @src path is
always going to be a relative path. e.g. src=file:g0001.png.


Technically, file:g0001.png is an invalid URL. You try to
use the concepts relative URL and relative path in a file system,
interchangeably, which will lead to problems at some point. There
is no sure fire way to specify a relative file path in a place where
an URL is expected, unless you control the base URL setting as Jeremias
described.

J.Pietschmann

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



Re: ClassCast-Exception when trying fopfactory.newinstance()

2008-04-08 Thread J.Pietschmann

Jeremias Maerki wrote:

Works for me. The ClassCastException doesn't make much sense as the
AFPExtensionHandlerFactory IS an implementation of the
ContentHandlerFactory interface. So I realy don't understand why this
happens. The only reason I can think of is that there's is a mix of
different, incompatible versions of fop.jar in the classpath.


In a web application, this may also be happen if the
AFPExtensionHandlerFactory has been loaded in a different
security context , which means it is an implementation of
the ContentHandlerFactory of the other context. Still, the
primary cause is that there are two FOP jars (and a cross
servlet call).

J.Pietschmann


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



Re: java.lang.NoSuchMethodError: org.apache.fop.fonts.base14.Helvetica.init(Z)V

2008-04-08 Thread J.Pietschmann

pdiop wrote:

500 Servlet Exception
java.lang.NoSuchMethodError: org.apache.fop.fonts.base14.Helvetica.(Z)V


Errors like this are usually caused by having two different FOP
jars, either in the class path (check the web apps, the servlet
container's class path and the JRE directories), or in different
web applications calling each other.

J.Pietschmann

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



Re: Need immediate help.. FOP on Solaris Box

2008-04-07 Thread J.Pietschmann

Newkid wrote:

The problem is, how do I create a
PDF/RTF and XML files in the EAR file dynamically. By all mean, I am unable
to find out creating / reading the files from the deployed EAR in the
weblogic.


While this is still technically possible, that's not the way Sun
imagined how EJB applications should work. Why on earth should an EJB
app create or change a file in the local file system? Even if it was
sensible, it is outside the scope of FOP. You should ask a professional
EJB developer for solutions to your problem. However, I'm certain you
are already heading down the wrong alley. Take a step back.


The problem is, can FOP convert the xml using XSL byte by byte???
Can FOP take XML file as STRING and generate PDF as STRING? Since, there is
NO change in the XSL file, I can keep it the web directory easily. If yes,
how?


I'm sorry to say but I can't make sense out of this.

J.Pietschmann

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



Re: Need immediate help.. FOP on Solaris Box

2008-04-06 Thread J.Pietschmann

Newkid wrote:

Can any one let me know whether one can create an PDF file with the
following options:

a. Reading XML file from the stream, passing XSL which is stored in the
webdirectory and storing it in some other directory?

b. Reading XML from the database, passing XSL which is stored in the
webdirectory and output the pdf as a stream?


Technically: yes for both questions.  However, this is based
on a woefully broad set of assumptions on what you probably
mean. Which is, based on experience with this kind of questions,
slightly different from what you actually mean.
Ok, the assumptions are:
- You develop a web application based on Java servlets
- For question a, you want to read an XML document from a
  servlet input stream, transform it using an XSL style sheet
  read from a file belonging to the web application, render
  the result to PDF and store it as a file somewhere else.
- For question b, you read a complete XML document from the
  database, transform/render it and send to the servlet's
  output stream.

Usually, follow-up questions include
- How do I get the XSL transformation? Possible answers:
  Either put in a jar in the lib directory (i.e. on the
  classpath) and load it as a resource, or put it into the
  content area and try to use getRealPath to resolve the
  file system path. Both methods have drawbacks.
- How do I get the XML from the database into the transformation?
  Answer: ask someone how the get it as a string, then use a
  StringSource.
- Why doesn't FOP like the XML read from the database? Answer:
  It's the XML parser which barfs for a variety of possible reasons:
   - you didn't store a proper XML document in the database field
   - the database mangled the character encoding
   - the XML was double escaped by an automatism which tried to
 be helpful, but wasn't
   - your server runs an old Java version and your XML triggered a
 known bug in the parser included in the JRE.
- Why doesn't the browser show the PDF? Actually, the question should
  be: How do I debug this? Answer: develop and test each step
  separately. Develop the transformation outside of the web
  application. Make sure you get the same XML out of the database
  which you put in. Put only everything together and in the web
  application once you are sure every step works. Don't do small
  fixes for the XSL transformation in the web application
  environment, develop it in the external environment, run the
  automated regression tests (you write automated regression
  tests, do you?), then deploy it.

I still wonder where the solaris box factlet fits in.

J.Pietschmann

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



Re: Could not load external SVG: Connection timed out

2008-04-04 Thread J.Pietschmann

Jens Kisters wrote:

[ERROR] Could not load external SVG: Connection timed out

...

I don't unterstand what kind of connection is timing out the SVG file is
embedded from the local filessytem


The network access is most likely for retrieving the SVG DTD.
You can either
1) Delete the DTD reference from the SVG, or try to produce
  the SVG without the DTD reference.
2) Use an entity resolver, a catalog and a local copy of the DTD
 http://xml.apache.org/commons/components/resolver/resolver-article.html

The FOP application should probably provide the latter out of the
box. If you have some time to spare you can send in a patch.

J.Pietschmann

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



Re: FOP 0.94 bin - Severe Exceptions on Solaris Box

2008-03-20 Thread J.Pietschmann

Matt Healy wrote:

I went back and checked the script, and found that IFS is being set just
to the newline character, and does not include spaces.


This is intentional: it avoids splitting directorie names which
contain spaces, which is rather common now especially on Windows.

J.Pietschmann

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



Re: Embeded Cyrillic Font still showing unicode chars .. HELP!!

2008-02-20 Thread J.Pietschmann

Andreas Delmelle wrote:

If this method generates a String containing
'#;', then when doc.createTextNode() is called to insert the text
into the DOM, the ampersands will be escaped to 'amp;'.


Only on serialization. The XSLT process will see literally #;
The most common reason for double escaping is that escaped data
is written as-is into a database, and escaped a second time upon
reading. The immediate insertion in a DOM text node only exposes
the second escaping, which would not be visible if the string was
send to a browser.

J.Pietschmann

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



Re: What could be the cause of SAXException like this: Mismatch: page-number (http://www.w3.org/1999/XSL/Format) vs. page-number ()?

2008-02-15 Thread J.Pietschmann

Andrejus Chaliapinas wrote:

My XSL has entries like these:

xsl:copy-of
select=xalan:nodeset(ext:generateSubtree()) /

Where generateSubtree() is external Java class method and returns result in
form of org.w3c.dom.NodeList and inside that nodes list I have nodes like
fo:page-number/  and whole XSL has such attribute specified:

xmlns:fo=http://www.w3.org/1999/XSL/Format;

Now when I run whole transformation process - I get:

org.xml.sax.SAXException: Mismatch: page-number
(http://www.w3.org/1999/XSL/Format) vs. page-number ()


It looks like Xalan passes an empty string to the endElement method,
while the startElement looked correct. The most likely reason is that
the namespace settings on your DOM tree are messed up, possibly during
processing.
It is also quite possible that you have hit a bug in Xalan. Try to find
out which Xalan version you are actually using (e.g. by using
system-property(xsl:vendor)), you might have to tell your JRE to use a 
newer one.

If you serialize the result of the transformation rather then feeding
it into FOP, do you also see a wrong end tag? (you might have to insert
a text node into the fo:page number element to see an effect)
In either case you can probably gather more useful information on the
Xalan user list.

J.Pietschmann

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



Re: Vertical text

2008-01-24 Thread J.Pietschmann

Amick, Eric wrote:

I want to put some text in the region-start that is written vertically,

[...]

I've played with writing-mode and reference-orientation, but I can't
quite get that effect. Am I going to have to resort to putting the
individual characters in fo:character elements, or is there a cleverer
way to do it?


What's clever? A generic approach to problems which are hard to solve
in FO is to embed a SVG.


Eric Amick
Legislative Computer Systems
Office of the Clerk


Sounds quite officially! :-)

J.Pietschmann

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



Re: Transforming data from two xml files.

2008-01-23 Thread J.Pietschmann

Tatiyana wrote:

 I  put two xml files in the fop command line, but I got errors in unknown
location.


FOP does not support this.

You'll probably have to use the document() function in your
transformation:
  http://www.w3.org/TR/xslt#document

J.Pietschmann

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



Re: How to put batch process into background on Mac OS

2008-01-04 Thread J.Pietschmann

Terry Ofner wrote:
I have not studied how to include the XSLT transformation. Here is how 
it would go:


source XML document xslt transform via saxon (xslt 2.0) --- 50+ .fo 
documents ---fop---50+ pdf documents.


The xslt automatically produces the 50 fo docs via 
xsl:result-document. Would all this go into one build.xml? If so, 
would I just call the xslt task first then call the 
generate_multiple-pdf task?


Basically yes. You might have to figure out how to get Ant to use
Saxon instead of the XSLT processor bundled with the JVM on your
machine, which probably provides XSLT 1.0 only. Setting the classpath
might not be enough.
The Ant documentation has plenty of examples for Ant build file snippets
and complete build files, which might help you getting started.

J.Pietschmann

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



Re: How to supress page breaks between bullet and text?

2008-01-04 Thread J.Pietschmann

Jay Bryant wrote:
Try putting the image and text into two different cells in a one-row 
table and setting keep-together=always on the row.


A fo:list-block should do the trick too:
 http://www.w3.org/TR/xsl/#fo_list-block

J.Pietschmann

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



Re: Detecting a page break before it happens

2008-01-04 Thread J.Pietschmann
=continuedcontinued.../fo:markerLorem 
Ipsum/fo:block

/fo:table-cell
  /fo:table-row
  fo:table-row
fo:table-cell border=solid 1pt black padding=2pt
  fo:blockfo:marker
 marker-class-name=continuedcontinued.../fo:markerLorem 
Ipsum/fo:block

/fo:table-cell
  /fo:table-row
  fo:table-row
fo:table-cell border=solid 1pt black padding=2pt
  fo:blockfo:marker
 marker-class-name=continuedcontinued.../fo:markerLorem 
Ipsum/fo:block

/fo:table-cell
  /fo:table-row
  fo:table-row
fo:table-cell border=solid 1pt black padding=2pt
  fo:blockfo:marker
 marker-class-name=continuedcontinued.../fo:markerLorem 
Ipsum/fo:block

/fo:table-cell
  /fo:table-row
  fo:table-row
fo:table-cell border=solid 1pt black padding=2pt
  fo:blockfo:marker
 marker-class-name=continuedcontinued.../fo:markerLorem 
Ipsum/fo:block

/fo:table-cell
  /fo:table-row
  fo:table-row
fo:table-cell border=solid 1pt black padding=2pt
  fo:blockfo:marker
 marker-class-name=continuedcontinued.../fo:markerLorem 
Ipsum/fo:block

/fo:table-cell
  /fo:table-row
  fo:table-row
fo:table-cell border=solid 1pt black padding=2pt
  fo:blockfo:marker
 marker-class-name=continuedcontinued.../fo:markerLorem 
Ipsum/fo:block

/fo:table-cell
  /fo:table-row
  fo:table-row
fo:table-cell border=solid 1pt black padding=2pt
  fo:blockfo:marker
 marker-class-name=continuedcontinued.../fo:markerLorem 
Ipsum/fo:block

/fo:table-cell
  /fo:table-row
  fo:table-row
fo:table-cell border=solid 1pt black padding=2pt
  fo:blockfo:marker
 marker-class-name=continuedcontinued.../fo:markerLorem 
Ipsum/fo:block

/fo:table-cell
  /fo:table-row
  fo:table-row
fo:table-cell border=solid 1pt black padding=2pt
  fo:blockfo:marker
 marker-class-name=continuedcontinued.../fo:markerLorem 
Ipsum/fo:block

/fo:table-cell
  /fo:table-row
  fo:table-row
fo:table-cell border=solid 1pt black padding=2pt
  fo:blockfo:marker
 marker-class-name=continuedcontinued.../fo:markerLorem 
Ipsum/fo:block

/fo:table-cell
  /fo:table-row
  fo:table-row
fo:table-cell border=solid 1pt black padding=2pt
  fo:blockfo:marker
 marker-class-name=continuedcontinued.../fo:markerLorem 
Ipsum/fo:block

/fo:table-cell
  /fo:table-row
  fo:table-row
fo:table-cell border=solid 1pt black padding=2pt
  fo:blockfo:marker
 marker-class-name=continued /fo:markerLorem Ipsum/fo:block
/fo:table-cell
  /fo:table-row
/fo:table-body
  /fo:table
  fo:block space-before=6pt
Some text after the table to demonstrate that the
continued... text only appears if the table continues.
  /fo:block
  fo:blockLorem Ipsum/fo:block
  fo:blockLorem Ipsum/fo:block
  fo:blockLorem Ipsum/fo:block
  fo:blockLorem Ipsum/fo:block
  fo:blockLorem Ipsum/fo:block
  fo:blockLorem Ipsum/fo:block
  fo:blockLorem Ipsum/fo:block
  fo:blockLorem Ipsum/fo:block
  fo:blockLorem Ipsum/fo:block
  fo:blockLorem Ipsum/fo:block
  fo:blockLorem Ipsum/fo:block
  fo:blockLorem Ipsum/fo:block
  fo:blockLorem Ipsum/fo:block
  fo:blockLorem Ipsum/fo:block
  fo:blockLorem Ipsum/fo:block
  fo:blockLorem Ipsum/fo:block
  fo:blockLorem Ipsum/fo:block
  fo:blockLorem Ipsum/fo:block
  fo:blockLorem Ipsum/fo:block
  fo:blockLorem Ipsum/fo:block
  fo:blockLorem Ipsum/fo:block
/fo:flow
  /fo:page-sequence
/fo:root

Each cell except the last defines a marker with the text contunued...
and the last cell has an blank marker (the space suppresses the warning
you'll get in case you use an empty marker). If your table rows are
larger than just one line you'll have to fiddle with the marker
placement (at or near the end of the cell), and in some cases you
may have to tweak other things too.

J.Pietschmann

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



Re: Need image to render at higher DPI

2008-01-04 Thread J.Pietschmann

Glenn Brand wrote:

I am getting better results but the image still comes in bigger than
what I specifiy and at the lower DPI.
Can you spot the problem from the XSL-FO?

...

fo:external-graphic background=transparent width=50pt height=50pt


I think you need
 fo:external-graphic content-width=50pt content-height=50pt

J.Pietschmann

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



Re: Noisy output when formatting DocBook despite -q

2008-01-03 Thread J.Pietschmann

Warren Young wrote:
I'm trying to fix or suppress the warnings I'm getting from FOP 0.94 in 
formatting MySQL++'s (http://tangentsoft.net/mysql++/) user manual.


I'm afraid you wont have much luck...

...

- fo:table, table-layout=auto is currently not supported by FOP

I've tried disabling this one by trying to set the default table width 
to 100% in my fo.xsl customization layer, but it doesn't help.


You can fix this by adding an attribute table-layout=fixed to every
table in your customization layer. If there is no such attribute, FOP
uses the default table-layout=auto, but automatic table layout isn't
supported yet, alas. The error message doesn't have anything to do with
the table width.


- Line 1 of a paragraph overflows the available area. (fo:block, 
location: 2/33495)


- The contents of row 1 are taller than they should be


I don't think you can easily silence these messages without overriding
the FOP logger.

Are these problems due to the DocBook stylesheets (using 1.69.1 here) or 
are they problems in FOP?


I don't know. I'd have to take a look at the generated FO files.

Can I suppress these without just redirecting 
stderr to /dev/null? I actually used to do that, but it also suppresses 
true errors like Java stack traces when I crash FOP.


Indeed.

J.Pietschmann

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



Re: Error

2008-01-03 Thread J.Pietschmann

irene23 wrote:

I have this error:

...

Caused by: java.lang.IndexOutOfBoundsException: Index: 90, Size: 90
at java.util.ArrayList.RangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at
org.apache.fop.layoutmgr.KnuthSequence.getElement(KnuthSequence.java:
159)


That's a problem with the global page layout. I suggest upgrading
to the latest FOP release (0.94), which is a bit further advanced
in this area. If the problem persists, we'll need a complete FO
file in order to track down the defect.

J.Pietschmann

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



Re: Long long SVG... what happens?

2007-12-31 Thread J.Pietschmann

Giulio Buccini wrote:

:working:I have a long SVG document (generated with Batik) containing
formatted text yet (paragraphs, titles and so on).

Question is: does somebody know how will be the above document rendered when
embedded in a FO block?

If I will provide only width scaling (to preserve the correct width/height
ratio) the document will be correctly distributed across multiple pages?
The svg doc will be brutally truncated at the end of any page?%-O


Whether you refer to the SVG as image or as foreign element, it
is always rendered as graphics, i.e. an unbreakable block. You
can't have page breaks in a graphic. If the SVG is larger than
the page heigth, FOP will most likely end processing with an error.
Otherwise, FOP will search a fitting space, which may cause a page break
and rendering the SVG at the beginning of the new page.

J.Pietschmann

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



Re: Chinese in Bold

2007-12-27 Thread J.Pietschmann

arbabu wrote:

I am using FOP for PDF generation in multiple languages and using
ArialUnicode MS font. I am able to get the bold property for all single byt
echaracters but not double byte chars like chines. Could yo u please let me
know if I can generate Chinese PDF with bold and Italic property?


In order to get bold or italic variants for characters
in a user supplied font you have to get hold of a font
file containing these variants, and you have to tell FOP
in its configuration to use them. FOP can't generate
bold or italic characters on itself.
Unfortunately, there isn't neither a bold nor an italic
variant available for the MS Arial Unicode font. For
Chinese characters, you can try to track down a file
with MS Mincho bold (I hope I spelled it correctly),
however, MS Mincho isn't free and you might have to
buy it. I can't remember I've ever seen a font with
italic variants for Chinese, and it doesn't make a
lot of sense either.

J.Pietschmann



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



Re: create FONode objects directly and generate PDF file

2007-12-02 Thread J.Pietschmann

Daling Xu wrote:

But is it possible directly create FONode objects, e.g. Flow, Table
in my java code and then call a FOP api (maybe a Renderer or
something) to generate a PDF file from the root FONode object?


If you really want to create PDF in a more direct way, you should
use libraries like iText which are much better suited for this task
then FOP.

J.Pietschmann

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



Re: Links to named destinations of password protected PDFs

2007-10-29 Thread J.Pietschmann

caporale wrote:

I have working named destinations in my PDF, and I can link to them fine if
the PDF isn't password protected.  When I password protect the PDF, the PDF
opens, asks me to put in the password, but stays on the first page of the
document.

Is this just how it works, or is there a way to link to named destinations
in password protected PDFs? 




I don't know whether this is the way it works since I don't have
access to tools other than FOP which can generate  encrypted PDFs
with named destinations.  I suspect however that the markers for
the destinations are not properly processed for encrypted PDFs, FOP
had similar problems with embedded fonts and other PDF objects in
the past.
If you can produce a password protected PDF with a named destination
which open as expected, then please open a defect for FOP and append
the correct PDF.

J.Pietschmann


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



Re: Links to named destinations of password protected PDFs

2007-10-29 Thread J.Pietschmann

caporale wrote:

I have working named destinations in my PDF, and I can link to them fine if
the PDF isn't password protected.  When I password protect the PDF, the PDF
opens, asks me to put in the password, but stays on the first page of the
document.

Is this just how it works, or is there a way to link to named destinations
in password protected PDFs?


I don't know whether this is the way it works since I don't have
access to tools other than FOP which can generate  encrypted PDFs
with named destinations.  I suspect however that the markers for
the destinations are not properly processed for encrypted PDFs, FOP
had similar problems with embedded fonts and other PDF objects in
the past.
If you can produce a password protected PDF with a named destination
which open as expected, then please open a defect for FOP and append
the correct PDF.

J.Pietschmann

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



Re: external-graphic

2007-10-29 Thread J.Pietschmann

macsmaker wrote:

javax.servlet.ServletException: org.xml.sax.SAXParseException: Content is
not allowed in prolog


This is not an issue with FOP, the error is produced by the XML parser
included in your Java environment. At least one 1.4 JDK release is known
to include an XML parser having a bug which may cause the problem above.
Upgrading to a more recent JDK release, at least to the latest 1.4
release, should fix the problem.
FOP 0.20.5 contained its own, even older XML parser, so you didn't
notice the problem there.

J.Pietschmann

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



  1   2   3   4   >