-3

I am searching from nearly one month to generate graphs using Apache-FOP Pdf Generation. Finally I am asking you coders.Please help me.

<metrics>
    <duration>22s.531ms</duration>
    <failed>1</failed>
    <passed>2</passed>
    <skipped>6</skipped>
    <total>9</total>
</metrics>
Manikanta Reddy
  • 849
  • 9
  • 23

1 Answers1

1

Once you managed to create a nice chart using any chart library you like ( like JFreeChart or similar), check out these examples from the Apache FOP website on how to embed the generated image into your pdf:

<fo:block>
The image (
  <fo:external-graphic content-width="100pt" content-height="50pt" scaling="non-uniform" src="images/fop.jpg"/>
) has non-uniform scaling.
</fo:block>

<fo:block>
The image (
<fo:external-graphic content-width="50pt" content-height="100pt" scaling="non-uniform" src="images/fop.jpg"/>
) has non-uniform scaling.
</fo:block>

<fo:block>
The image (
<fo:external-graphic content-width="100pt" content-height="75pt" scaling="uniform" src="images/fop.jpg"/>
) has uniform scaling.
</fo:block>

<fo:block>
The image (
<fo:external-graphic content-width="75pt" content-height="100pt" scaling="uniform" src="images/fop.jpg"/>
) has uniform scaling.
</fo:block>

<fo:block>
The image (
<fo:external-graphic width="75pt" height="100pt" content-width="scale-to-fit" content-height="scale-to-fit" src="images/fop.jpg"/>
) is scaled to fit the viewport.
</fo:block>
Jan
  • 13,738
  • 3
  • 30
  • 55