Last week of coding have been finished and I found VERY interesting things while working on EPS and MS Visio XML Schema’s.
EPS Schema Export
As you know I had installed xampp in Ubuntu. So, I could install PS PECL Extension to code EPS files. But damn, I got stuck while PECL INSTALL PS package in xampp. I tried again a lot of forums/tutorials to get that working in xampp and put a lot of time on these issues. I also contacted PECL developer mailing lists and they suggested me to remove xampp and install lamp on ubuntu. So, I removed xampp and installed lamp but again I got the errors again while compiling PS PECL at Ubuntu. Someone at PECL developer mailing list suggested me a key point and here it is
apt-get install libgd2-xpm-dev
pecl install ps
Actually, PS library have dependency to isntall libgd2 first and then install PS but PS package doesn’t have this dependency listed at their website. After having such issues I finally got PS PECL installed in lampp and I started to code EPS schema. Remember, my main concern to use PS PECL was to calculate the width of the string in EPS. but when I generated a test Post script file I noticed some Interesting things.
First let me tell what is EPS:
An EPS file is a PostScript file which follows the DSC and which follows a couple of other rules. These rules can be summarized as follows:
- The first line must be %!PS-Adobe-3.0 EPSF-3.0
- The file must make use of the BoundingBox comment
- The file should be a single page image (in DSC terms, the %%Pages comment must have a value of 0 or 1).
- The file should not use any operators which affect the global state.
PS PECL is actually generates a post script file not Encapsulated Post Script file. This is what I noticed that PS lib is not what I required or wanted and what I was messing with it around from previous couple of weeks to get it working I misunderstood or guess that PS Lib will solve the problem I have.
So, I reversed myself and continue working with manually creating EPS files using Commands by following the above mentioned points. Though there are some limitations according to my knowledge but I have done my best and I will continue to work on it in future too.
MS Visio XML Schema
Generating Visio XML .VDX is really a challenging task and due to a limited time I left after messing with EPS. I would not be able to completely implemented it and get it 100% working. But I have done as much as I could do so far.
Visio XML needs a lot of study of XML Schema’s of Visio 2003 and 2006. I also consulted visio forums and visio MVP’s to know more about the XML generation of Visio XML outside of VISIO IDE tool. I gathered a lot of information and stuff but It needs more time to get it complete. The main reason is VISIO save the files in XML .VDX but it creates a lot of XML that we need ages to know. So, to create files outside of Visio and using php langauge we need complete knowledge of XML Schema of Visio which I have started exploring. I will keep in touch with these schema’s and would give time as much as possible to cover it in future.
There were lots of obstacles on my way to get some things working perfectly and I didn’t got success but this leads me to road of success !!