I changed it as below. It finished the conversion pretty fast and did not create a PDF file. when I checked the output in debug mode I saw a classcast exception as below. Am I doing something wrong here.

Regards,
Suresh

-------------------------------------------------------------------------------
<fo:block-container height="82px" width="294px">
<fo:block>
<fo:basic-link color="blue" external-destination="http://www.onjava.com/" >
         

<fo:external-graphic content-height="82px" content-width="294px" height="82px" width="294px"
                 src="" scaling="uniform"/>

</fo:basic-link>
</fo:block>
</fo:block-container>
------------------------------------------------------------------------------------------------

Exception trace:
------------------------
org.apache.fop.apps.FOPException: org.apache.fop.layout.BlockArea
        at org.apache.fop.apps.CommandLineStarter.run(CommandLineStarter.java:11
1)
        at org.apache.fop.apps.Fop.main(Fop.java:62)

---------

java.lang.ClassCastException: org.apache.fop.layout.BlockArea
        at org.apache.fop.fo.flow.BlockContainer.layout(BlockContainer.java:157)

        at org.apache.fop.fo.flow.Block.layout(Block.java:257)
        at org.apache.fop.fo.flow.AbstractFlow.layout(AbstractFlow.java:154)
        at org.apache.fop.fo.flow.AbstractFlow.layout(AbstractFlow.java:110)
        at org.apache.fop.fo.pagination.PageSequence.makePage(PageSequence.java:
400)
        at org.apache.fop.fo.pagination.PageSequence.format(PageSequence.java:33
8)
        at org.apache.fop.apps.StreamRenderer.render(StreamRenderer.java:262)
        at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:223)
        at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source
)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknow
n Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.fop.apps.Driver.render(Driver.java:498)
        at org.apache.fop.apps.CommandLineStarter.run(CommandLineStarter.java:10
6)
        at org.apache.fop.apps.Fop.main(Fop.java:62)

---------

java.lang.ClassCastException: org.apache.fop.layout.BlockArea
        at org.apache.fop.fo.flow.BlockContainer.layout(BlockContainer.java:157)

        at org.apache.fop.fo.flow.Block.layout(Block.java:257)
        at org.apache.fop.fo.flow.AbstractFlow.layout(AbstractFlow.java:154)
        at org.apache.fop.fo.flow.AbstractFlow.layout(AbstractFlow.java:110)
        at org.apache.fop.fo.pagination.PageSequence.makePage(PageSequence.java:
400)
        at org.apache.fop.fo.pagination.PageSequence.format(PageSequence.java:33
8)
        at org.apache.fop.apps.StreamRenderer.render(StreamRenderer.java:262)
        at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:223)
        at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source
)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknow
n Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.fop.apps.Driver.render(Driver.java:498)
        at org.apache.fop.apps.CommandLineStarter.run(CommandLineStarter.java:10
6)
        at org.apache.fop.apps.Fop.main(Fop.java:62)
Roland Neilands <[EMAIL PROTECTED]> wrote:
Suresh,

Sorry, my mistake. 20.5 wants height/width on the block container.

This works in both versions:



content-width="3cm" src="" scaling="uniform"/>

Regards,
Roland



Suresh Koya wrote:
> I checked this with the beta build also. I could not get it to work.
> Should I file a bug to this respect.
>
> Regards,
> Suresh Koya
>
> */Roland Neilands <[EMAIL PROTECTED]>/* wrote:
>
> Suresh,
>
> What you've done is correct, but not supported by the old version
> of FOP
> - try the beta release, or use height & width attributes as well.
> Search
> this list's archives for more details, this has come up a few times.
>
> Regards,
> Roland
>
>
> Suresh Koya wrote:
> > Hi,
> >
> > I am using FOP 0.20.5. I was trying to transform the IMG tag of
> HTML:
> >
> >
> > height="82"/>
> >
> > After going through the XSL_FO Spec, I created a FO document
> > equivalent to this for generating a PDF as belows:
> >
> >
> > src=""/>
> >
> > The generated PDF had the image bigger than the original size
> (294 X 82).
> > Is could not find an example for this in the samples as well.
> >
> > Could anyone suggest what is the right way to set the width and
> height
> > a image.
> >
> > Regards,
> > Suresh
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ------------------------------------------------------------------------
> Ring'em or ping'em. Make PC-to-phone calls as low as 1¢/min
>
> with Yahoo! Messenger with Voice.

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



How low will we go? Check out Yahoo! MessengerÂ’s low PC-to-Phone call rates.

Reply via email to