问题
I have a letterhead of a company made in HTML, Where the user fills in his Company Details and rest of the information. When the user clicks on the SUMBMIT button that particular form should convert it to .eps format and then PRINT.
Does any one have any clue of how its done.
回答1:
I have no idea how to convert html form to .eps format for illustrator. But since you also mentioned that you want to print that form to printer you can do something like this -
When user clicks on print button call a js function
createHTML()
which reads all the form data and create an html. for eg.var html = "<h1>"+$('#nameField').val()+"</h1>" +
"<p>"+$('#msgField').val()+"</p>";
Now create a new window in js as below -
win = window.open(", ", 'popup', 'toolbar = no, status = no');
win.document.write("" + html + "");
Then call
win.print()
Check this fiddle - http://jsfiddle.net/ashwyn/WrTwW/
来源:https://stackoverflow.com/questions/11241222/convert-html-to-eps-format-for-illustrator