[Phpmyadmin-devel] GSOC - Export relations scheme other formats

Kishanthan Thangarajah kshanth2101 at gmail.com
Sun Mar 28 23:06:06 CEST 2010


Hi Marc,

Here is a draft proposal for the idea : Export relations scheme other formats

After doing some studies on this idea I came across is that exporting
to SVG and EPS formats is possible with the use of some PHP libraries
available.

Be fore going in to the details on first we will see what is a SVG and EPS.

SVG
According to W3C, SVG is a standard for XML based "Scalable Vector
Graphics". Due its nature being XML, it is  easy to generate. It is a
open standard, easy to debug and user readable. XML always has the
disadvantage of large files, compared with the information which is
contained. But, as vector graphics formats don't need to describe each
pixel, but shapes which may be far bigger. Common SVG graphics are
mostly smaller then similar images which use a bitmap format.
As SVG is XML it is easy to define your own or include details from
other namespaces directly in your SVG document.
The most important use of SVG format is that it is a better solution
image scalability requirement. Because in SVG, the image data
represented as vector paths and can therefore be scaled up to a higher
resolution without any distortion or quality loss.

EPS
Encapsulated Post Script (EPS) is a standard file format for importing
and exporting Post Script files. It is usually a single page Post
Script program that describes an illustration or an entire page. The
purpose of an EPS file is to be included in other pages. Sometimes EPS
files are called EPSF files. EPSF simply stands for Encapsulated Post
Script Format.
An EPS file can contain any combination of text, graphics and images.
Since it is actually a Post Script file, it is one of the most
versatile file formats that are available. EPS-files usually contain a
small preview image that is used to visualize the content of the file.
This is done so that applications don’t need a Post Script interpreter
to display the content of the EPS file.

First we will look at creating a SVG file.
We can create a SVG file with the use of  PHP Document Object Model[1]
or eZ Components[2]. Both of these are open source general purpose PHP
components libraries.  Document Object Model (DOM) is an extension
that allows us work with XML documents through the DOM API. So with
the use of this DOM API we can create a SVG file with the given data.
In ez Components it uses a SVG driver to create SVG files. The driver
gets the image primitives from the renderer and creates the final SVG
image.

But from what I have found is that for EPS there is no PHP libraries
which directly output the EPS file. So I thought of  first to create a
file with known format(eg - .pdf) and then convert that to EPS format.

My questions:
1)Is there any libraries other than what I have mentioned above, which
can be used? If so can you direct me those resources?
2)Please provide feedback on this draft proposal, on the decisions I
have made? So that I can come up with a better one.

[1] http://www.php.net/manual/en/intro.dom.php
[2] http://ezcomponents.org/introduction/overview

Thanks in Advance.
-- 
Kishanthan.T




More information about the Developers mailing list