Problem with images in the call ApacheFOP from .NET

View: New views
2 Messages — Rating Filter:   Alert me  

Problem with images in the call ApacheFOP from .NET

by Benedetti Valerio :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hello,

 

My name is Valerio and I’m a developer of the CADIT company in Verona, Italy.

 

I am running tests with IKVM [ikvm-0.38.0.2] in order to compile libraries in FOP 0.20.5. NET and use them in applications .NET 2.0.

I'm experiencing some problems in the management of images that I cannot resolve.

When I try to generate a PDF from a FO that includes a picture I encounter this exception:

 

FOP ExampleFO2PDF

 

Preparing...

Input: XSL-FO (c:\work\prtTestIMG.fo)

Output: PDF (c:\work\prtTestIMG.pdf)

 

Transforming...

[INFO] Using com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser

 as SAX2 Parser

[INFO] building formatting object tree

[INFO] setting up fonts

[INFO] [1]

Warning: default mime table not found: C:\.virtual-ikvm-home\lib\content-types.p

roperties

[ERROR] Error in XObject : Error while loading image file:/U:/prtHeader.gif : cl

ass java.lang.ClassCastException - Unable to cast object of type 'java.io.Buffer

edInputStream' to type 'java.awt.image.ImageProducer'.

[INFO] Parsing of document complete, stopping renderer

 

 

Can you give me some advice on how to resolve this issue?

 

Attached you’ll find the source FO and sample I used for this test.

 

Many thanks and Best Regards, Valerio

 

_____________________

Valerio Benedetti
Gruppo CAD IT
Via Torricelli 44/A
37136 Verona – Italy
Tel. +39045 82 11 111
Fax +39045 82 11 110
benedettiv@...
www.cadit.it
_____________________

Questo messaggio, con gli eventuali allegati, contiene informazioni riservate o confidenziali . Chiunque lo ricevesse pur non essendone il destinatario è pregato di segnalarlo immediatamente al mittente, di cancellarlo dal proprio sistema e di non copiarlo, diffonderne il contenuto o utilizzarlo in alcun modo.

This e-mail and any files transmitted with it are confidential or privileged. If you are not the intended recipient of this e-mail, please notify the sender and delete it from your system immediately: you should not copy, disclose or use either it or its attachments in any way whatsoever.

 




------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Ikvm-developers mailing list
Ikvm-developers@...
https://lists.sourceforge.net/lists/listinfo/ikvm-developers

prtTestIMG.fo (1K) Download Attachment
ExampleFO2PDF.cs (4K) Download Attachment

Re: Problem with images in the call ApacheFOP from.NET

by Volker Berlin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hi,
 
FOP has duplicate resources in the jar files. That you need to compile it in multipe dll's. With ikvm 0.40 you can use:
 
ikvmc -target:library -sharedclassloader { avalon-framework-4.2.0.jar } { batik-all-1.7.jar } { commons-io-1.3.1.jar } { commons-logging-1.0.4.jar } { fop.jar } { serializer-2.7.0.jar } { servlet-2.2.jar } { xalan-2.7.0.jar } { xercesImpl-2.7.1.jar } { xml-apis-1.3.04.jar } { xml-apis-ext-1.3.04.jar } { xmlgraphics-commons-1.3.1.jar }
 
 
Volker
 


Von: Benedetti Valerio [mailto:benedettiv@...]
Gesendet: Montag, 20. Juli 2009 16:25
An: ikvm-developers@...
Betreff: [Ikvm-developers] Problem with images in the call ApacheFOP from.NET

Hello,

 

My name is Valerio and I’m a developer of the CADIT company in Verona, Italy.

 

I am running tests with IKVM [ikvm-0.38.0.2] in order to compile libraries in FOP 0.20.5. NET and use them in applications .NET 2.0.

I'm experiencing some problems in the management of images that I cannot resolve.

When I try to generate a PDF from a FO that includes a picture I encounter this exception:

 

FOP ExampleFO2PDF

 

Preparing...

Input: XSL-FO (c:\work\prtTestIMG.fo)

Output: PDF (c:\work\prtTestIMG.pdf)

 

Transforming...

[INFO] Using com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser

 as SAX2 Parser

[INFO] building formatting object tree

[INFO] setting up fonts

[INFO] [1]

Warning: default mime table not found: C:\.virtual-ikvm-home\lib\content-types.p

roperties

[ERROR] Error in XObject : Error while loading image file:/U:/prtHeader.gif : cl

ass java.lang.ClassCastException - Unable to cast object of type 'java.io.Buffer

edInputStream' to type 'java.awt.image.ImageProducer'.

[INFO] Parsing of document complete, stopping renderer

 

 

Can you give me some advice on how to resolve this issue?

 

Attached you’ll find the source FO and sample I used for this test.

 

Many thanks and Best Regards, Valerio

 

_____________________

Valerio Benedetti
Gruppo CAD IT
Via Torricelli 44/A
37136 Verona – Italy
Tel. +39045 82 11 111
Fax +39045 82 11 110
benedettiv@...
www.cadit.it
_____________________

Questo messaggio, con gli eventuali allegati, contiene informazioni riservate o confidenziali . Chiunque lo ricevesse pur non essendone il destinatario è pregato di segnalarlo immediatamente al mittente, di cancellarlo dal proprio sistema e di non copiarlo, diffonderne il contenuto o utilizzarlo in alcun modo.

This e-mail and any files transmitted with it are confidential or privileged. If you are not the intended recipient of this e-mail, please notify the sender and delete it from your system immediately: you should not copy, disclose or use either it or its attachments in any way whatsoever.

 


------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Ikvm-developers mailing list
Ikvm-developers@...
https://lists.sourceforge.net/lists/listinfo/ikvm-developers