I’m having some problem with my current project. I’m making t-shirt creator somethink similar to this:http://www.zazzle.com/cr/design/pt-shirt using javascript with jquery.
Now I have no idea how to save t-shirt project created using this. My only idea, but I don’t think it is good, is to send all coordinates of objects to PHP script and then using fpdf create pdf from this. Using similar technique, I mean sending coordinates to php script, I can also make a bitmap file.
But as you can see this is quite complicated and long method.
So do you know any technique to save such a project to PDF and bitmap file?
Thanks in advance
EDIT:
I though that the best place for anserws on nyarlathotep‘s questions would be in here.
what format are your t-shirt designs in(1), what kind of data do you have there(2)? what have you tried so far(3)? Being that vague, there is no real answer to your question
- there isn`t anything like t-shirt format I thought that this is obvious – this is simple web page where you can place pictures or text on other pictures.
- data is just pictures (or more accuret img tags into divs), or text, aldo in divs.
- for me this is weired question. I’ve mentioned my idea, but it isn’t good because it is very complicated and I supose that there is easier way for that.
After many tries and tests, only one option seems to work, which is the first option – save all coordinates.
Technically, I am now using predefined in size and position rectangle inside which I am moving around my objects (objects are added dynamically). To move object I am using jQuery methods for objects moving. Also I am using some methods for resizing (jQuery).
After all, everything is send to PHP. Than it is “redrawn” onto PDF using fpdf and this picture (PDF) is presented to a user.
After some code optimization it is the easiest and fastest way which I came up with.
I hope it will help someone at the beginning.