-1

I have html input type field in my upload form but I am not using <form></form> I just have bunch of text box select box and input file field . I need to upload the .ai file and show a display .png/.jpg image format for it in my own html

   jQuery("#main_gallery_view").prepend(thumbnail_html);

closest answer I could get was How to embed .ai files in HTML5? but this answer also does not tell any way to convert the .ai files to image format(jpg, png)

So for my last try I am checking with stackoverflow experts.

Is this really feasible?

Is there any workaround to convert .ai files to image format(jpg, png) ?

I am using windows os and I will be saving it in my CDN S3 bucket

Community
  • 1
  • 1
Hitesh
  • 4,098
  • 11
  • 44
  • 82

1 Answers1

1

There is no direct way to do this in the browser.

Depending on your hosting environment and operating system you can upload the .ai Adobe Illustrator file to your back-end and then run a script to convert it to SVG for example using a tool like this for Linux, UniConvertor, http://manpages.ubuntu.com/manpages/precise/man1/uniconvertor.1.html

Then you would have to retrieve the processed SVG and then embed that on your page and then follow methodologies from this question/answer to process it into PNG in the browser: Convert embedded SVG to PNG in-place

Due to the many variables and ambiguity in terms of your back-end, it is impossible to be more specific, however the general flow should ring true no-matter what your back-end system be.

Community
  • 1
  • 1
Rob Schmuecker
  • 8,934
  • 2
  • 18
  • 34
  • Is it posssible to all this in one upload click ? – Hitesh Sep 11 '14 at 08:40
  • Perhaps, not sure. All depends on your backend but should be possible yes. – Rob Schmuecker Sep 11 '14 at 08:47
  • lets say I upload the .ai file in my CDN and then which convertor to be used for converting it to svg using cdn url – Hitesh Sep 11 '14 at 08:55
  • 1
    @hitesh this doesn't make sense. You can only upload it to a server you control and then you would process it depending on your operating system. Please stop trying to get people to do your work for you. You are being a help-vampire. – Rob Schmuecker Sep 11 '14 at 09:34
  • I am sorry if you felt like that . I was not trying make anybody work . I was just looking for solution to convert the ai file to png which so far I did not get in Google – Hitesh Sep 11 '14 at 13:35
  • Thanks for the answer !!! is there any other converter for windows ..since http://manpages.ubuntu.com/manpages/precise/man1/uniconvertor.1.html this one in for command line tool for ubuntu – Hitesh Sep 11 '14 at 13:37