ok i dont thik i have a configuracion file i find the code that i put in the
other post i think its the basic 
 

Rob Sargent-4 wrote:
> 
> Do you have a config file for log4j.  Usually it's in a resource tree.  
> Are you copying that to your deployment? Is your ant script including 
> the config file in the jar of your application?
> 
> On 06/13/2011 10:12 AM, Oscar.Flores wrote:
>> Ok yeah the log4j its having isuees to find the configuration
>>
>> log4j:WARN No appenders could be found for logger
>> (org.apache.fop.util.ContentHandlerFactoryRegistry).
>> log4j:WARN Please initialize the log4j system properly.
>> log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for
>> more info.
>> i go to the faq guide and it say try loading the class or resource
>> yourself.
>> If you can't find it, neither will log4j.
>>
>> aaa i dont know where to set this
>>
>> also here its my xlst
>>
>>
>> http://old.nabble.com/file/p31835645/FacturasOMF.xsl FacturasOMF.xsl
>>
>>
>> and the fo file that generate the editix
>>
>> http://old.nabble.com/file/p31835645/Prueba.fo Prueba.fo
>>
>>
>> Rob Sargent-4 wrote:
>>> The first thing is to really dig into what you did to netbeans to get it
>>> to work...
>>>
>>> I've forgotten what your stylesheet looked like, so maybe if you show us
>>> again how you're referencing your images we might notice a problem.
>>>
>>> It might also help to see the "fo" generated during your transformation.
>>> Can you grab that just after xslt and just before fop calls.
>>>
>>> Are you sure there is no error being logged somewhere when you run from
>>> the command line? (Where is log4j writing and at what level?)
>>>
>>>
>>>
>>> Oscar.Flores wrote:
>>>> You where absolutly rigth i miss a few libraries to add into the jar
>>>> file, i
>>>> modified the build.xml to add the package and jar that i need, now the
>>>> error
>>>> message is not there but still the images dont show in the pdf i
>>>> remeber
>>>> that i do something in netbeans so they can add to the pdf but i cant
>>>> remeber i dont now if there is still a library that is missing or i am
>>>> adding more than it should be
>>>> This is what i use :
>>>> cfdi-base-0.1.6-SNAPSHOT.jar
>>>> guava-r09.jar
>>>> guava-r09-gwt.jar
>>>> jaxb-impl-2.1.10.jar
>>>> avalon-framework-api-4.3.jar
>>>> avalon-framework-cvs-20020806.jar
>>>> avalon-logkit-2.1.jar
>>>> not-yet-commons-ssl-0.3.11.jar
>>>> commons-codec-1.5.jar
>>>> commons-codec-1.5-sources.jar
>>>> log4j-1.2.16.jar
>>>> fop.jar
>>>> jdom.jar
>>>> xmlgraphics-commons-1.4.jar
>>>> commons-io-1.3.1.jar
>>>> fop-pdf-images-2.0.1.SNAPSHOT.jar
>>>> pdfbox-app-1.5.0.jar
>>>> fontbox-1.3.1.jar
>>>> jempbox-1.3.1.jar
>>>> xercesImpl-2.7.1.jar
>>>> batik-all-1.7.jar
>>>> xml-apis-1.3.04.jar
>>>> xml-apis-ext-1.3.04.jar
>>>>   avalon-framework-4.2.0.jar
>>>>   xalan-2.7.0.jar
>>>>   serializer-2.7.0.jar
>>>>   commons-logging-1.0.4.jar
>>>>   jai_codec.jar
>>>>   jai_core.jar
>>>>   batik-ext.jar
>>>>   jai_imageio-1.1-sources.jar
>>>>
>>>> Thanks Rob for the help
>>>>
>>>>
>>>> Rob Sargent-4 wrote:
>>>>
>>>>> I suspect running from your jar does not have/use the same classpath
>>>>> that is in effect while you're in the debugger.
>>>>> By what mechanism do you generate the jar?
>>>>> Is it an executable jar or are you running java -classpath
>>>>> <your-jar-here:other-jars>  Main?
>>>>> Make your IDE (netbeans) display the classpath  it uses to run your
>>>>> app
>>>>> and compare that with the above.
>>>>>
>>>>> On 06/09/2011 07:21 PM, Oscar.Flores wrote:
>>>>>
>>>>>> aaa ok well my problem is that when i do the pdf in netbean the pdf
>>>>>> is
>>>>>> fine
>>>>>> with images and evething but when i run the jar file in command it
>>>>>> give
>>>>>> me a
>>>>>> error
>>>>>>
>>>>>> GRAVE: Error while processing image: I:\cfd\rfc.jpg (image/jpeg)
>>>>>>    org.apache.xmlgraphics.image.loader.ImageException: Cannot load
>>>>>>    image (no suitable loader/converter combination available) for
>>>>>> I:\cfd\rfc.jpg
>>>>>>    (image/jpeg)
>>>>>>
>>>>>> so i dont no what its not working and if i have to add something to
>>>>>> my
>>>>>> code
>>>>>> so the images can load i am soooo desperate what i am doing wrong??
>>>>>> i am sorry for the trouble and if a dont explain my self very good
>>>>>> jejeje
>>>>>>
>>>>>>
>>>>>> Rob Sargent-4 wrote:
>>>>>>
>>>>>>> Not at all sure what your problem is.  All I can do is show you what
>>>>>>> works for us.
>>>>>>>
>>>>>>> Our source xml looks like this:
>>>>>>> <image image-id="381623861" reference-id="ref-220" width="750"
>>>>>>> height="750" image-space-id="space-1" position="5"
>>>>>>>                 image-pool-position="31" pos="4"
>>>>>>>                 file="ref_10_1002108221">   <!-- an actual file
>>>>>>> (.jpeg
>>>>>>> copied the working directory of the transformer -->
>>>>>>> <fields />
>>>>>>> <caption />
>>>>>>> <annotations>
>>>>>>> <arrow_positions origHeight="750" origWidth="750" />
>>>>>>> </annotations>
>>>>>>> </image>
>>>>>>>
>>>>>>> Our xslt looks like this for each image needed.
>>>>>>>
>>>>>>> <xsl:template name="image">
>>>>>>> <xsl:param name="img"/>   <!-- This is the xml node from the source
>>>>>>> xml
>>>>>>> above -->
>>>>>>> <xsl:param name="width"/>
>>>>>>> <xsl:param name="height" select="$width"/>
>>>>>>> <xsl:param name="ignoreHeight">false</xsl:param>
>>>>>>> <fo:block>
>>>>>>> <fo:external-graphic src="{$img/@file}" height="{$height}"
>>>>>>> width="{$width}" content-height="scale-to-fit"
>>>>>>>                                     content-width="scale-to-fit"
>>>>>>> border="0.5pt solid black" border-collapse="separate">
>>>>>>> <xsl:if test="$ignoreHeight != 'true'">
>>>>>>> <xsl:attribute name="height">
>>>>>>> <xsl:value-of select="$height"/>
>>>>>>> </xsl:attribute>
>>>>>>> </xsl:if>
>>>>>>> </fo:external-graphic>
>>>>>>> </fo:block>
>>>>>>> </xsl:template>
>>>>>>>
>>>>>>> Our generated fo looks like this:
>>>>>>> <fo:table-cell>
>>>>>>> <fo:block>
>>>>>>> <fo:external-graphic border-collapse="separate" border="0.5pt solid
>>>>>>> black" content-width="scale-to-fit" content-height="scale-to-fit"
>>>>>>> width="2.5in" height="2.5in" src="ref_10_1002108221" />
>>>>>>> </fo:block>
>>>>>>> </fo:table-cell>
>>>>>>>
>>>>>>> And the generated pdfs include the image and are shipped to the
>>>>>>> printer.
>>>>>>>
>>>>>>> How does this stack up with what you have?
>>>>>>>
>>>>>>>
>>>>>>> On 06/09/2011 01:19 PM, Oscar.Flores wrote:
>>>>>>>
>>>>>>>> Hi there well i still got the problem but searching IN INTERNET i
>>>>>>>> find
>>>>>>>> a
>>>>>>>> JPEG
>>>>>>>> renderer output for FOP its here
>>>>>>>>
>>>>>>>> http://marc.info/?l=fop-user&m=125986752706366&w=2
>>>>>>>>
>>>>>>>> the cuestion is can i render the image that i want to put in the
>>>>>>>> pdf,
>>>>>>>> and
>>>>>>>> then add to the xsl the render jpeg it will work??
>>>>>>>>
>>>>>>>> and here explaints how use the render when he say uses fop as
>>>>>>>> normal
>>>>>>>> case
>>>>>>>> what does it mean
>>>>>>>> what else have to add to the code?? i hope you can help me
>>>>>>>>
>>>>>>>> Thanks!!
>>>>>>>>
>>>>>>>> // OutputStream out = what you want
>>>>>>>>                FopFactory fopFactory = FopFactory.newInstance();
>>>>>>>>                RendererFactory rendererFactory = null;
>>>>>>>>                FOUserAgent foUserAgent = null;
>>>>>>>>
>>>>>>>>                rendererFactory = fopFactory.getRendererFactory();
>>>>>>>>                rendererFactory.addRendererMaker(new
>>>>>>>> MultiRendererMaker("jpeg"));
>>>>>>>>                foUserAgent = fopFactory.newFOUserAgent();
>>>>>>>>                rendererFactory.createRenderer(foUserAgent,
>>>>>>>> "image/jpeg");
>>>>>>>>
>>>>>>>>                Fop fop = fopFactory.newFop("image/jpeg",
>>>>>>>> foUserAgent,
>>>>>>>> out);
>>>>>>>>
>>>>>>>> //Use fop as normal case
>>>>>>>>
>>>>>>>>
>>>>>>>> Rob Sargent-4 wrote:
>>>>>>>>
>>>>>>>>> Since you're now into xmlgraphics, I think you're best bet is here
>>>>>>>>> <http://xmlgraphics.apache.org/commons/image-loader.html>
>>>>>>>>>
>>>>>>>>> On 06/07/2011 10:18 AM, Oscar.Flores wrote:
>>>>>>>>>
>>>>>>>>>> Hi ok this is for generate images that dont need to be decompress
>>>>>>>>>> later??
>>>>>>>>>> and
>>>>>>>>>> the result image i put in my xsl ?? then it should work, aaa i
>>>>>>>>>> change
>>>>>>>>>> to
>>>>>>>>>> fop
>>>>>>>>>> 1.0 and xml communs 1.4 and its the same jejeje   dont find the
>>>>>>>>>> image
>>>>>>>>>> preload
>>>>>>>>>>
>>>>>>>>>> org.apache.fop.fo.flow.ExternalGraphic bind
>>>>>>>>>> SEVERE: Image not available: The file format is not supported. No
>>>>>>>>>> ImagePreloader for *.jpg or *.bmp
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Rob Sargent-4 wrote:
>>>>>>>>>>
>>>>>>>>>>> ImageIO.write(bufferedImage, "JPEG", file);
>>>>>>>>>>>
>>>>>>>>>>> On 06/07/2011 08:21 AM, Oscar.Flores wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Ok i actually register the handler now what i have to do is
>>>>>>>>>>>> setup
>>>>>>>>>>>> this
>>>>>>>>>>>> handler or not?? and how can i do that, also it seem that the
>>>>>>>>>>>> bmp
>>>>>>>>>>>> its
>>>>>>>>>>>> not
>>>>>>>>>>>> recognice also what can i do?? thanks for the help rob
>>>>>>>>>>>> also i am trying to convert the images to see if it that helps
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Rob Sargent-4 wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> On 06/06/2011 02:29 PM, Oscar.Flores wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Hi what can be the difference between execute the program in
>>>>>>>>>>>>>> netbeans
>>>>>>>>>>>>>> (where
>>>>>>>>>>>>>> it works and print the images and the jar in the console)
>>>>>>>>>>>>>>
>>>>>>>>>>>>> Different classes being loaded by Netbeans than the console
>>>>>>>>>>>>> app.
>>>>>>>>>>>>> Get
>>>>>>>>>>>>> Netbeans to show you the full classpath it's using in it's
>>>>>>>>>>>>> "%classpath"
>>>>>>>>>>>>> variable
>>>>>>>>>>>>>
>>>>>>>>>>>>>> also i tried the
>>>>>>>>>>>>>> imageIO.getImageReadersBySuffix but i cant interpretate the
>>>>>>>>>>>>>> data
>>>>>>>>>>>>>> y.y,
>>>>>>>>>>>>>> its
>>>>>>>>>>>>>> that or always its true in the boolean variable, and how can
>>>>>>>>>>>>>> i
>>>>>>>>>>>>>> register
>>>>>>>>>>>>>> the
>>>>>>>>>>>>>> handler??
>>>>>>>>>>>>>>
>>>>>>>>>>>>> Talk to IIORegistry, some thing like
>>>>>>>>>>>>>
>>>>>>>>>>>>> IIORegistry.getDefaultInstance().registerServiceProvider(new
>>>>>>>>>>>>> CLibJPEGImageReaderSpi());
>>>>>>>>>>>>>
>>>>>>>>>>>>> IIORegistry.getDefaultInstance().registerServiceProvider(new
>>>>>>>>>>>>> CLibJPEGImageWriterSpi());
>>>>>>>>>>>>> Note: those are not necessarily the services you have in your
>>>>>>>>>>>>> setup.
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Thanks
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Rob Sargent-4 wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> See the javadoc on IIORegistry. With ImageIO you may have to
>>>>>>>>>>>>>>> register
>>>>>>>>>>>>>>> your handler(s). What does ImageIO.getImageReadersBySuffix()
>>>>>>>>>>>>>>> give
>>>>>>>>>>>>>>> you.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> For certain jpegs we don't use ImageIO, rather the classes
>>>>>>>>>>>>>>> in
>>>>>>>>>>>>>>> com.sun.image.codec.jpeg:
>>>>>>>>>>>>>>>                try {
>>>>>>>>>>>>>>>                    FileOutputStream fos = new
>>>>>>>>>>>>>>> FileOutputStream(file);
>>>>>>>>>>>>>>>                    JPEGImageEncoder encoder =
>>>>>>>>>>>>>>> JPEGCodec.createJPEGEncoder(fos);
>>>>>>>>>>>>>>>                    JPEGEncodeParam param =
>>>>>>>>>>>>>>> encoder.getDefaultJPEGEncodeParam(image.getRaster(),
>>>>>>>>>>>>>>> JPEGDecodeParam.COLOR_ID_CMYK);
>>>>>>>>>>>>>>>                    param.setQuality(1, false);
>>>>>>>>>>>>>>>                    encoder.encode(image.getRaster(), param);
>>>>>>>>>>>>>>>                    fos.close();
>>>>>>>>>>>>>>>                } catch (Throwable t) {
>>>>>>>>>>>>>>>                    logger.debug(t.getMessage());
>>>>>>>>>>>>>>>                }
>>>>>>>>>>>>>>> But generally we use ImageIO
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On 06/06/2011 08:29 AM, Oscar.Flores wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Yeah i think i need your help again i tried tu run the .jar
>>>>>>>>>>>>>>>> file
>>>>>>>>>>>>>>>> in
>>>>>>>>>>>>>>>> the
>>>>>>>>>>>>>>>> console it work but without images this it what appears
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> GRAVE: Error while processing image: I:\cfd\rfc.jpg
>>>>>>>>>>>>>>>> (image/jpeg)
>>>>>>>>>>>>>>>> org.apache.xmlgraphics.image.loader.ImageException: Cannot
>>>>>>>>>>>>>>>> load
>>>>>>>>>>>>>>>> image
>>>>>>>>>>>>>>>> (no
>>>>>>>>>>>>>>>> suitable loader/converter combination available) for
>>>>>>>>>>>>>>>> I:\cfd\rfc.jpg
>>>>>>>>>>>>>>>> (image/jpeg)
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> i tried  download the jai-imagio add to the class path but
>>>>>>>>>>>>>>>> it
>>>>>>>>>>>>>>>> dont
>>>>>>>>>>>>>>>> work
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Rob Sargent-4 wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Very odd.  I'm having no problems getting images into pdfs
>>>>>>>>>>>>>>>>> using
>>>>>>>>>>>>>>>>> fop-1.0.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> On 06/03/2011 11:04 AM, Oscar.Flores wrote:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> aaa hey thanks for the help the other day, i resolve the
>>>>>>>>>>>>>>>>>> problem
>>>>>>>>>>>>>>>>>> changing
>>>>>>>>>>>>>>>>>> the
>>>>>>>>>>>>>>>>>> version of FOP for the 0.95beta instead of the 1.0, it
>>>>>>>>>>>>>>>>>> works
>>>>>>>>>>>>>>>>>> now
>>>>>>>>>>>>>>>>>> it
>>>>>>>>>>>>>>>>>> prints
>>>>>>>>>>>>>>>>>> the image and its good, thanks and we are in touch if
>>>>>>>>>>>>>>>>>> anything
>>>>>>>>>>>>>>>>>> else
>>>>>>>>>>>>>>>>>> fails
>>>>>>>>>>>>>>>>>> jejeje
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> Rob Sargent-4 wrote:
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> Nothing in the log from the transformer?
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> On 06/03/2011 09:47 AM, Oscar.Flores wrote:
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> hi there i have another problem i hope you can help me
>>>>>>>>>>>>>>>>>>>> the
>>>>>>>>>>>>>>>>>>>> pdf
>>>>>>>>>>>>>>>>>>>> that
>>>>>>>>>>>>>>>>>>>> i
>>>>>>>>>>>>>>>>>>>> create
>>>>>>>>>>>>>>>>>>>> with foe has no image, it dont show any of them, the
>>>>>>>>>>>>>>>>>>>> xsl
>>>>>>>>>>>>>>>>>>>> seems
>>>>>>>>>>>>>>>>>>>> to
>>>>>>>>>>>>>>>>>>>> be
>>>>>>>>>>>>>>>>>>>> rigth i
>>>>>>>>>>>>>>>>>>>> tested with EditX and the pdf show me the image, what
>>>>>>>>>>>>>>>>>>>> can
>>>>>>>>>>>>>>>>>>>> it
>>>>>>>>>>>>>>>>>>>> be,
>>>>>>>>>>>>>>>>>>>> i
>>>>>>>>>>>>>>>>>>>> have
>>>>>>>>>>>>>>>>>>>> xmlgraphics-commons-1.5svn, fop 1.0, fop-pdf-images
>>>>>>>>>>>>>>>>>>>> 2.0.1
>>>>>>>>>>>>>>>>>>>> Snapshot
>>>>>>>>>>>>>>>>>>>> for
>>>>>>>>>>>>>>>>>>>> the
>>>>>>>>>>>>>>>>>>>> render of the image but it don work please help!!!  :,(
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>>>>>>>>>>> To unsubscribe, e-mail:
>>>>>>>>>>>>>>>>>>> [email protected]
>>>>>>>>>>>>>>>>>>> For additional commands, e-mail:
>>>>>>>>>>>>>>>>>>> [email protected]
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>>>>>>>>> To unsubscribe, e-mail:
>>>>>>>>>>>>>>>>> [email protected]
>>>>>>>>>>>>>>>>> For additional commands, e-mail:
>>>>>>>>>>>>>>>>> [email protected]
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>>>>>>> To unsubscribe, e-mail:
>>>>>>>>>>>>>>> [email protected]
>>>>>>>>>>>>>>> For additional commands, e-mail:
>>>>>>>>>>>>>>> [email protected]
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>>>>> To unsubscribe, e-mail:
>>>>>>>>>>>>> [email protected]
>>>>>>>>>>>>> For additional commands, e-mail:
>>>>>>>>>>>>> [email protected]
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>> :-):confused::confused::confused::confused:=)
>>>>>>>>>>>>
>>>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>>> To unsubscribe, e-mail:
>>>>>>>>>>> [email protected]
>>>>>>>>>>> For additional commands, e-mail:
>>>>>>>>>>> [email protected]
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: [email protected]
>>>>>>> For additional commands, e-mail:
>>>>>>> [email protected]
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: [email protected]
>>>>> For additional commands, e-mail: [email protected]
>>>>>
>>>>>
>>>>>
>>>>>
>>>> http://old.nabble.com/file/p31822059/libraries.jpeg
>>>> http://old.nabble.com/file/p31822059/libraries.bmp libraries.bmp
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [email protected]
>>> For additional commands, e-mail: [email protected]
>>>
>>>
>>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Problems-with-FOP-and-image-tp31766430p31836113.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to