Thursday 15 July 2010

xml - Dynamic charts or graphs in PDF -


I want to embed dynamic charts or graphs in PDFs, which can be sorted by sorting, drill down, group, collapse etc. One option I think is to create dynamic charts in Flash SWF from XML format & amp; Then embed this SWF and XML file into PDF. I understand that we can embed SDF in PDF using iDstead. However, how to embed SWF & amp; XML at the same time in PDF it will work? My second question is if there are alternatives other than the SWF + XML combo which I can use to generate PDF for free or low cost with dynamic charts or graphs. Is it possible with Jasper Rippers or BIRT or Penthouse or Fusion Chart? Can I embed Dynamic Fusion Chart in PDF?

Thanks,

Open row

A Note: Richmedia in PDF PDF is expandable with 1.7 and therefore works only with Adobe Reader 9+ (10 is not recommended as this feature has a bug that was never fixed).

The first answer is using RenderX, as I'll work for RenderX, this is an easy one. Here is a template xsl that can be used to be known as rich media annotation

You may have some XML in this type of file:

  & Lt; Chart SWF = "SWF \ Anychart.swf" flashvar = "XMLData" width = "300" height = "300" & gt; & Lt; Anychart & gt; .... & lt; / Anychart & gt; & Lt ;! - Insert XML for charts here - & gt; & Lt; Resources & gt; & Lt; Source src = "img \ a.png" /> & Lt; / Resources & gt; & Lt; / Chart & gt;   

You can call the template below to get one of these.

Here are the parameters:

chartxml: XML file that runs the chart

width and height: self explanatory

flashvar: flashvir To pass XML to the SDF on the SDF, it is "XMLX" for FusionChart for Anychart, it is "DataXML"

@swf: This template has the path to the actual SWF file (like "SWF 'Anychart.swf' or 'SWF \ Bar2D .swf'

Resources: Required for chart or map or anything (like images) Because no other external resource

  and  lieutenant: xsl: param name = "charts xml" />  xsl : Ultimate name = "width" /> gt; written: ultimate name = "height" />    & Lt; / Xsl: attribute & gt; & Lt; Rx: Flash-var name = "{$ Flashvar}" content = "true" & gt; & Lt; Xsl: apply-templates = "$ chartxml" mode = "copy-off" / & gt; & Lt; / Rx: flash-var & gt; & Lt; Xsl: each selection = "resource / resource" & gt; & Lt; Select RX: Rich Media - Resourc E & gt; & Lt; Xsl: attribute name = "src" & gt; & Lt; Xsl: text & gt; Url ('& lt; / xsl: text & gt; & lt; xsl: select value = "@ session" />  & Lt; / XSL: Specialty & gt; & Lt; / Rx: rich media resources & gt; & Lt; / XSL: for-each & gt; & Lt; / Rx: rich media-object & gt; & Lt; For /: Block & gt; & Lt; / XSL: Templates & gt;   

This will insert a block with an RX: rich media object in your FO document. RenderX does all the internal handles in PDFs linking the associated properties (charts XML and any resource). The result is an interactive flash chart inside the PDF formatted document. There are other ways to do this. You can also insert Flash and put it for FuCenture using "XFI File" (for OnCart) or "Detoural" and enter the data (such as) or whatever you can do in the URL,

For iText, there are correct samples on your site rather than posting more here. Look at this link, it shows all the code in Java to insert a SWF and data set:



No comments:

Post a Comment