A while ago I asked how to Include Adobe Illustrator files (ai) with XeTeX. However, the PDF version of the Illustrator files is 1.5 and I compile my XeLateX documents to version 1.4 so the newer illustrator files can't be included without conversion.
I've now found that ps2pdf14 can take the illustrator ai file as an input and easily output a pdf 1.4 compatible version.
I've tried working the with DeclareGraphicsRule
based on Convert gif image to png on the fly however, I can't seem to figure out a rule that works to run ps2pdf14?
I've tried these:
\DeclareGraphicsRule{.ai}{pdf}{.pdf}{`ps2pdf #1}
\DeclareGraphicsRule{.ai}{pdf}{.ai.pdf}{`ps2pdf #1}
\DeclareGraphicsRule{.ai}{pdf}{.pdf}{`ps2pdf14 #1 `dirname #1`/`basename #1 .ai`-ai-converted-to.pdf}
\DeclareGraphicsRule{.ai}{pdf}{.pdf}{ps2pdf14 \SourceFile.\SourceExt \OutputFile}
Here is an .ai file from the latest illustrator version (CS5) if anyone wants to play around: link removed
It would be ideal if the conversion was only done if the illustrator document has been modified after the converted pdf file or if the converted pdf file doesn't exist.
Maybe a make file or script of some kind would be a better solution.