On 05.01.2011 16:25:20 gen1986 wrote:
> 
> Hi Chris,
> 
> > Did you add the 
> > file named "org.apache.xmlgraphics.image.loader.spi.ImageConverter" to 
> > the JAR containing your code in META-INF\services sub directory as 
> > suggested by Jeremias?
> 
> Yep (you can see it in the attachment).

the attachment seems to be missing.

> I have created a ImageChartPreloader to preload the ImageInfo from
> DOMSource. 
> What I can see is that the originalURI is null. 

Yeah, looks like I gave bad advice here, that the Preloader isn't
necessary. Obviously, it is.

> 1) Should I do something at some place to specifiy that uri? (where, how...)

No, no URI is involved when fo:insteam-foreign-object is used.

> 2) However even if the originalURI is null as I can get all the infos from
> the source it's ok.
> But what MimeType should I give to the created ImageInfo? (I've tried some,
> but I always get the same error : no suitable loader/converter
> combination...etc)

I've used "application/x-barcode4j+xml" for Barcode4J. Create another
custom one with "application/x-[something]+xml".

> 3) I've tried to solve my problem with the preloader, but if it's not the
> right way for doing it (ex: maybe
> setting some attributes to the Document is?) tell me.

I think the important thing is to support a DOMSource in the preloader
for your case. Again, take Barcode4J as a template.

> 4) Please take à look at the attachment, so you can tell me what is missing.

It didn't make it to the list. Try putting everything in a ZIP.

> 
> 
> Eugen
> 
> 
> cbowditch wrote:
> > 
> > On 05/01/2011 10:52, gen1986 wrote:
> > 
> > Hello,
> >> Stepan and Eric thanks for the suggestions but the whole thing must be
> >> done
> >> in java (the charting is only a part of the app).
> >> Jeremias solution is close to what I must do.
> >>
> >> After following the explanations of Jeremias and reading the sources of
> >> Barcode4J, etc. I manage to get something out, but it still doesn't work
> >> and
> >> I'm not sure about some points.
> >>
> >> 1) I don't have to call imageManager.convertImage(image, flavors) right ?
> >> It's the fop framework who will do that. However if it's true, something
> >> is
> >> going wrong because my converters are not executed.
> > 
> > Right, the Image Loader framework takes care of that. Did you add the 
> > file named "org.apache.xmlgraphics.image.loader.spi.ImageConverter" to 
> > the JAR containing your code in META-INF\services sub directory as 
> > suggested by Jeremias? This is needed in order for the Image Loader 
> > Framework to be made aware of your converter.
> >> 2) When I'm running the transformation I've got an error
> >> GRAVE: Image not available. URI: (instream-object). Reason:
> >> org.apache.xmlgraphics.image.loader.ImageException: The file format is
> >> not
> >> supported. No ImagePreloader found for null (No context info available).
> >>
> >> After googling a bit I've found that we have to add the following line to
> >> the fop conf :<prefer-renderer>true</prefer-renderer>
> > That is not the correct solution. The prefer-renderer option forces use 
> > of the older renderers. The old Renderers don't benefit from the latest 
> > bug fixes and improvements that have been made to the painters.
> > 
> >> If I'm doing so I've got another error : No handler defined for my
> >> namespace...
> >>
> >> So instead asking a lot of questions I've uploaded a basic test project
> >> so
> >> you can see what I'm doing wrong.
> >> http://old.nabble.com/file/p30594894/Fop-ChartExtension.rar
> >> Fop-ChartExtension.rar
> >>
> >> Thanks for your help!
> > 
> > Thanks,
> > 
> > Chris
> > 
> >> Eugen
> >>
> >>
> >>
> > <snip/>
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> > For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
> > 
> > 
> > 
> 
> -- 
> View this message in context: 
> http://old.nabble.com/how-to-extend-the-rendering-part-of-fop-tp30579066p30597037.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
> 




Jeremias Maerki


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

Reply via email to