• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Displaying scalable vector graphics on ibm aix

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We are preparing a bill template (say mobile bill kind of bill) and we need to display a chart for the last 3 months calls in the template.
We are able to display the template which is a pdf file using FOP. But, the actual problem is we need to display a generic graph in the pdf for each customer in the bill template.

We have tried using JFreechart and display the chart. Iam able to save in the windows machine. But, iam unable to save it in the server (this is a part of our busineess logic design where we are trying to store the chart in the server and append this to the pdf.)

For displaying SVG(Scalable Vector Graphics) images on the invoice after running fop-0.94, we need X11 library. But after installing this also, we are unable to see the bar graph chart on the invoice through X Manager (GUI for IBM AIX Server).

Moreover while generating bar graph through Jfreechart taking help of two libraries (jfreechart-1.0.4.jar,jcommon.jar) also, the same thing happens and we are unable to see the bar graph chart on the invoice through X Manager.

But in both the cases, we are getting the bar graph generated on Windows System successfully.

These are the responses from the fop-users and fop-development groups (where i browsed through google):-
If you just want to display SVG images, that requires Apache Batik in the classpath . Batik is bundled with FOP.

For SVG you need the batik libraries, which are part of the fop standard distribution. So the problem here seems to be something else.

I currently know of no FOP extensions that would allow to add bar graphs(you mean charts, right?) in a special XML dialect as part of an
fo:instream-foreign-object. So that means you have to generate SVG graphics from bar graphics using a third-party tool

Findings from the above discussions :-

It may be a case that something is missing in the AIX Operating System which is restricting us to allow/create dynamic images on the invoice through either of the above two methods.
 
Bartender
Posts: 1638
IntelliJ IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looks like it is more or less related to Apache FO. You will get better answers in Other Open source projects forum. Moving ....
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So... the reason you're looking into SVG is because you couldn't get JFreeChart to work on AIX? If that's the case I'd investigate why that's happening. Generally, it works just fine.

we are unable to see the bar graph chart


What does this mean? Is the chart being created? If it is created, can you save it to disk? If you can save it to disk, is it a valid image file? If it is a valid image file, what stands between having a valid image file and displaying it? TellTheDetails
 
Vamsi bhujanga
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moreover when we contacted IBM customer care, this is the reply we received.

IBM response:
Unfortunately Adobe's SVG Viewer is no longer available for AIX. We found that Adobe has decided to discontinue it's SVG Viewer product. Please refer the following links for more details.

http://www.adobe.com/svg/eol.html
http://www.adobe.com/svg/pdfs/ASV_EOL_FAQ.pdf

But there are some other Adobe products which currently supports SVG. Also there are a lot of third party SVG viewer products.


Please suggest

For the question: we are unable to see the bar graph chart



Here is the sample code we are using.. (SOme things are changed accordingly)



This code works fine and creates a jpeg on Windows OS.
But, this doesnot save when we run ON AIX. Basically, we need to save this on the server to do other operations.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What do you mean by "this does not save"? I don't see any code that would save anything to a file. It also doesn't use JFreeChart.
 
Vamsi bhujanga
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry i kept the wrong code initially. I have updated the previous post.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Make sure that the account used to run this code has access rights to whatever directory you're using on the server to write the file to (obviously, AIX does not have a "C:/" directory).
 
Vamsi bhujanga
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As i mentioned in the post, some code is modified for some reasons. I have given the server location in place of C:/ directory.
Anyhow, here is the url which states that Adobe is discontinuing the SVG. Now, iam in search of any 3rd party tool which supports SVG on AIX.
Iam sure that some one would be working on this.Any help will be greatly appreciated.

http://www.adobe.com/svg/eol.html

Thanks in advance
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

As i mentioned in the post, some code is modified for some reasons.


Ah. Well, posting code that works to illustrate code that doesn't work is of limited usefulness.

I have given the server location in place of C:/ directory.


And that directory is accessible by the account the server runs under, and is not prohibited by a security policy?

Now, iam in search of any 3rd party tool which supports SVG on AIX.


You mentioned Batik before, but I don't quite understand why that didn't work out. Can you post the specific details of that?
 
Vamsi bhujanga
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

You mentioned Batik before, but I don't quite understand why that didn't work out. Can you post the specific details of that?



Batik is a bundled with FOP itself. We are even confused and struggling here in displaying SVG.
As i mentioned in my earlier post, SVG viewer is no longer supporting AIX.
Please suggest an alternate solution for this. Is there any 3rd party tool that can be useful to display chart on AIX OS.Iam searching for this kind of tool.Can anybody suggest me.

Thanks in advance.

 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I still think trying to figure out the problem with JFreeChart might get you a solution much quicker than resorting to SVG instead.
 
Vamsi bhujanga
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have copied the code of JFreeChart in my previous post (which iam using). What else can be updated in it? IS there anything incorrect or did i miss anything else??

Also,if everything is correct (iam sure it would be), what can be the alternate to save the image in the AIX?

Please suggest.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In my very first post in this topic I asked "Is the chart being created? If it is created, can you save it to disk? If you can save it to disk, is it a valid image file? If it is a valid image file, what stands between having a valid image file and displaying it?" I've yet to see any indication that you have tried to answer any of these.

Later on I wrote "And that directory is accessible by the account the server runs under, and is not prohibited by a security policy?" You haven't responded to that one, either.
 
Vamsi bhujanga
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The chart is being created.
Iam able to save on the hard disk (on Windows OS).
It is a valid image

The same image when i tried to save on AIX server, it is restricting as i told in my above post.
Also, the directory where iam trying to save is not restricted on any security policy of the server.

Ulf Dittmer,
Hope, i answered to all the questions.

In my earlier post, i have mentioned that Adobe- no more supports SVG viewer. I am in search of 3rd party tool to save the image on the AIX. please suggest (Hope, my question is clear now).


 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

The same image when i tried to save on AIX server, it is restricting as i told in my above post.
Also, the directory where iam trying to save is not restricted on any security policy of the server.


What does "it is restricting" mean? Is there an exception? If so, post the stack trace. I doubt that Java code can do file I/O operations that do not succeed, yet the JVM would not produce exceptions.
reply
    Bookmark Topic Watch Topic
  • New Topic