[texhax] including remote graphics file

Alexander Grahn A.Grahn at fz-rossendorf.de
Fri Nov 25 12:42:44 CET 2005


Well, I assumed you sought a way to display an image which is held on
some web server, beeing updated regularly there, such that its current
state gets displayed whenever the user opens the document (e. g. a chart
showing stock price development comes to mind).

If you simply want the image file to be downloaded just before its
inclusion, use of \write18 might help:

  \write18{wget http://someserver.org/image.jpeg}
  \includegraphics{image}

However, there are caveats with this approach too. Firstly, it requires the
fetching command (`wget' in this case) to be installed on the targeted
system. Secondly, the user must know about the `-shell-escape' command
switch to LaTeX/pdfLaTeX, to enable \write18-functionality. Thirdly,
the image file format must be compatible with the output producing method
(Dvi, PDF).

Probably, manual download remains the safest option.

Alexander



More information about the texhax mailing list