Peter Coppens | 1 Oct 2008 09:46
Picon

Re: pdf-image extension problems

Got them. Thanks for that.

Unfortunately I run into 'a next' problem.

SEVERE: Exception stack tracejava.lang.IndexOutOfBoundsException: Index: 3,
Size: 2
        at java.util.ArrayList.RangeCheck(ArrayList.java:546)
        at java.util.ArrayList.get(ArrayList.java:321)
        at org.pdfbox.pdmodel.PDDocument.getPageFormat(PDDocument.java:776)
        at 
org.apache.fop.render.pdf.pdfbox.PreloaderPDF.loadPDF(PreloaderPDF.java:114)
        at 
org.apache.fop.render.pdf.pdfbox.PreloaderPDF.preloadImage(PreloaderPDF.java
:73)
        at 
org.apache.xmlgraphics.image.loader.ImageManager.preloadImage(ImageManager.j
ava:165)
        at 
org.apache.xmlgraphics.image.loader.cache.ImageCache.needImageInfo(ImageCach
e.java:96)
        at 
org.apache.xmlgraphics.image.loader.ImageManager.getImageInfo(ImageManager.j
ava:112)
        at 
org.apache.fop.fo.flow.ExternalGraphic.bind(ExternalGraphic.java:79)
        at org.apache.fop.fo.FObj.processNode(FObj.java:126)
        at 
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.jav
a:286)
        at 
(Continue reading)

Tom Browder | 1 Oct 2008 13:18
Picon

Fop Warnings

Just yesterday I got fop 0.95 installed to try tp make a pdf version
of the GnuCash (www.gnucash.org) guide, and the resukts look great for
the first time.  Obviously some tinkering will need to be done, but
that is to be expected for a newbie to docbook and fop.

I got a slew of warnings, most self-explanatory.

My question is:

Is there a way to get fop to point to the source of the warnings?

I've tried the -d (debug) option and that didn't help.

Thanks.

-Tom
Peter Coppens | 1 Oct 2008 13:31
Picon

Re: pdf-image extension problems


Please ignore last stack trace / problem. My mistake. Apologies for the
noise.

Peter

Peter Coppens wrote:
> 
> Got them. Thanks for that.
> 
> Unfortunately I run into 'a next' problem.
> 
> 
> SEVERE: Exception stack tracejava.lang.IndexOutOfBoundsException: Index:
> 3,
> Size: 2
>         at java.util.ArrayList.RangeCheck(ArrayList.java:546)
>         at java.util.ArrayList.get(ArrayList.java:321)
>         at
> org.pdfbox.pdmodel.PDDocument.getPageFormat(PDDocument.java:776)
>         at 
> org.apache.fop.render.pdf.pdfbox.PreloaderPDF.loadPDF(PreloaderPDF.java:114)
>         at 
> org.apache.fop.render.pdf.pdfbox.PreloaderPDF.preloadImage(PreloaderPDF.java
> :73)
>         at 
> org.apache.xmlgraphics.image.loader.ImageManager.preloadImage(ImageManager.j
> ava:165)
>         at 
> org.apache.xmlgraphics.image.loader.cache.ImageCache.needImageInfo(ImageCach
(Continue reading)

Tom Browder | 1 Oct 2008 13:34
Picon

Fop Options

First, thanks to the fop developers for a fine program--it has enabled
successful pdf generation of the GnuCash guide which apparently hasn't
been possible for some time with other docbook tool chains.

I am using the trunk version of fop and have a couple of comments:

When I execute 'fop' without arguments, I see the usage message but I
also see lots of gunk accompanying an exception.  Couldn't that part
be left out?   Most likely the user has intentionally omitted
arguments so he can to see the usage message (if any--I think it is
bad practice to design a CLI program without such a message).

Likewise, the -v and -d options throw exceptions and too much
extraneous info.  Eventually I would like to use 'fop -v' in a
configure test for gnucash, so the cleaner the output the better.

I will be happy to file a bug report if that is appropriate or am I
doing something wrong?

I will also be happy to try to fix the problem, but I am a C++/C/perl
programmer and have no java experience.

But I do have some bash scripting experience and see that fop is a
bash wrapper to Fop, so maybe I can help there.

Thanks.

-Tom
Peter Coppens | 1 Oct 2008 13:47
Picon

pdf-image extension - exception when referred page does not exist


Hello,

When referring to a page that is not present in the pdf, the pdf-image
extension throws an exception.

SEVERE: Exception stack tracejava.lang.IndexOutOfBoundsException: Index: 3,
Size: 2
        at java.util.ArrayList.RangeCheck(ArrayList.java:546)
        at java.util.ArrayList.get(ArrayList.java:321)
        at org.pdfbox.pdmodel.PDDocument.getPageFormat(PDDocument.java:776)
        at
org.apache.fop.render.pdf.pdfbox.PreloaderPDF.loadPDF(PreloaderPDF.java:114)
        at
org.apache.fop.render.pdf.pdfbox.PreloaderPDF.preloadImage(PreloaderPDF.java:73)
        at
org.apache.xmlgraphics.image.loader.ImageManager.preloadImage(ImageManager.java:165)
        at
org.apache.xmlgraphics.image.loader.cache.ImageCache.needImageInfo(ImageCache.java:96)
        at
org.apache.xmlgraphics.image.loader.ImageManager.getImageInfo(ImageManager.java:112)
        at
org.apache.fop.fo.flow.ExternalGraphic.bind(ExternalGraphic.java:79)

Is it thinkable to (optionally) change this behavior so that a "SEVERE"
message is logged but that processing continues...much like fop's standard
behavior when referring to non-existent images.

Thanks,

(Continue reading)

Vincent Hennebert | 1 Oct 2008 20:11
Picon

Re: Fop Warnings

Hi Tom,

Tom Browder wrote:
> Just yesterday I got fop 0.95 installed to try tp make a pdf version
> of the GnuCash (www.gnucash.org) guide, and the resukts look great for
> the first time.

That’s good news!

> Obviously some tinkering will need to be done, but
> that is to be expected for a newbie to docbook and fop.
> 
> I got a slew of warnings, most self-explanatory.
> 
> My question is:
> 
> Is there a way to get fop to point to the source of the warnings?

You have to write the XSL-FO produced by the XSLT processor into a file.
FOP will then be able to point you at the line and column numbers where
the errors or warnings come from. Since you’re asking this question
I guess that right now you’re producing the PDF like this:
    fop -xml document.xsl -xsl stylesheet.xsl -pdf document.pdf
For debugging purpose you can proceed in two steps:
    fop -xml document.xsl -xsl sytesheet.xsl -foout document.fo
    (Or directly call your favourite XSLT processor to produce the FO file.)
    fop -fo document.fo -pdf document.pdf

Note that that won’t point you to the DocBook source, unfortunately.
From the FO file you’ll have to figure out what part of the DocBook
(Continue reading)

Tom Browder | 2 Oct 2008 03:10
Picon

Re: Fop Warnings

On Wed, Oct 1, 2008 at 1:11 PM, Vincent Hennebert <vhennebert <at> gmail.com> wrote:
> Hi Tom,
>
> Tom Browder wrote:
...
>> Is there a way to get fop to point to the source of the warnings?
>
> You have to write the XSL-FO produced by the XSLT processor into a file.
...
> For debugging purpose you can proceed in two steps:
>    fop -xml document.xsl -xsl sytesheet.xsl -foout document.fo
>    fop -fo document.fo -pdf document.pdf
...
> Note that that won't point you to the DocBook source, unfortunately.
> From the FO file you'll have to figure out what part of the DocBook
> source that corresponds to. Tedious, but I'm not sure there is any

Thanks for the help, Vincent.

-Tom
John Brown | 2 Oct 2008 03:28
Picon
Favicon

RE: Fop Warnings


Tom Browder wrote:
> 
> On Wed, Oct 1, 2008 at 1:11 PM, Vincent Hennebert  wrote:
>> Hi Tom,
>>
>> Tom Browder wrote:
> ...
>>> Is there a way to get fop to point to the source of the warnings?
>>
>> You have to write the XSL-FO produced by the XSLT processor into a file.
> ...
>> For debugging purpose you can proceed in two steps:
>>    fop -xml document.xsl -xsl sytesheet.xsl -foout document.fo
>>    fop -fo document.fo -pdf document.pdf
> ...
>> Note that that won't point you to the DocBook source, unfortunately.
>> From the FO file you'll have to figure out what part of the DocBook
>> source that corresponds to. Tedious, but I'm not sure there is any
> 
> Thanks for the help, Vincent.
> 
> -Tom
> 

One more thing: the XSL-FO produced by FOP does not contain any
new line characters, so FOP will tell you that the error is on line 1 at
position 7458 o something similar. You can format the XSL-FO using
'xmllint --format' before running FOP. xmllint is part of the libxml2
project.
(Continue reading)

Tom Browder | 2 Oct 2008 03:35
Picon

Re: Fop Warnings

On Wed, Oct 1, 2008 at 8:28 PM, John Brown <johnbrown105 <at> hotmail.com> wrote:
> One more thing: the XSL-FO produced by FOP does not contain any
> new line characters, so FOP will tell you that the error is on line 1 at
> position 7458 o something similar. You can format the XSL-FO using
> 'xmllint --format' before running FOP. xmllint is part of the libxml2
> project.

Thanks for the additional info, John, good idea.

-Tom
nancy_b | 2 Oct 2008 08:44
Picon
Favicon

Re: Adding Verdana font in Linux and registering it with FOP 0.94


Thank you for your help!!! I appreciate it a lot!

Best regards,
Nancy

Alias John Brown wrote:
> 
> nancy_b <nancy_brndt <at> yahoo.com> writes:
> 
>> 
>> 
>> Hi John,
>> 
>> Thanks for your response! Unfortunately, the auto-detect capability did
>> not
>> work for me. By the way, where is the main configuration file that FOP
>> uses
>> to process default fonts and other parameters?
>> 
>> Thanks in advance!
>> Nancy
> 
> Apparently, the defaults are built-in. You have to make your own
> configuration file and run 
> fop -c <custom-conf-file> <rest-of-command-line>
> 
> Copy the sample file at There is a sample file at
> <fop-folder>/conf/fop.xconf and edit it. My previous
> post shows where to add (or uncomment) the necessary tags.
(Continue reading)


Gmane