• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Can you use ColdFusion to convert .AI files to PNG?

Guest
May 15, 2012 May 15, 2012

Copy link to clipboard

Copied

Is it possible in any way to convert an .AI file to a .PNG via ColdFusion. I've used the <cfimage> tag in the past to convert from PNG to JPG (example below). However, an AI file is a whole nother beast.

<!---Convert Image--->

<cfimage source="Image1.png" action="convert" destination="newImage1.jpg" name="newImage" overwrite="yes">

Does anyone know how to tackle this problem programmatically? Is it possible?

Views

772

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
May 16, 2012 May 16, 2012

Copy link to clipboard

Copied

LATEST

Not with cfimage. It does not support AI files.

I did not know the answer so I did some digging around. I came across an interesting thread which mentioned newer AI files are like pdfs in a sense. I ran a few brief tests and cfpdf seemed to be able to create thumbnail images of newer AI files. Though I cannot vouch for the quality of the end result.

      <cfpdf action="thumbnail"

                 source = "c:/path/myFile.ai"

                 format="png" ...>

You might also look into calling an external program, from cfexecute. From what I have read, programs like ImageMagick or Inkscape support AI file conversions, and probably offer more control over the output. Also if this is a one-off task, you might want to remove CF from the equation entirely and use a batch script to do the conversions.

HTH

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation