\includegraphics{myImage}
I would like to be able to do something like:
\includegraphicsfromurl{http://groups-beta.google.com/groups/img/3/groups_bar.gif}
Any suggestions?
You can't embed an external image into a PDF file dynamically. This is
because the page description would be incomplete, being unknown the
dimensions of the image.
Links in a PDF file are only bound to actions: you can define a link
that shows the external image, but not as embedded in the document.
At least, this is what seems to be possible with Acrobat Pro.
Ciao
Enrico
> >
\includegraphicsfromurl{http://groups-beta.google.com/groups/img/3/groups_ba
r.
> > gif}
>
> You can't embed an external image into a PDF file dynamically. This is
> because the page description would be incomplete, being unknown the
> dimensions of the image.
>
> Links in a PDF file are only bound to actions: you can define a link
> that shows the external image, but not as embedded in the document.
> At least, this is what seems to be possible with Acrobat Pro.
I think the original poster wished to statically embed the
external image. Just as a file on the hard disk would
be embedded statically.
At least that's how I read the query.
--
Jonathan
1.) Create a SMIL-container, such as `urlimage.smil':
<smil xmlns="http://www.w3.org/2001/SMIL20/Language">
<body>
<img src="http://www.aadmm.de/images/gf1.gif"/>
</body>
</smil>
2.) Embed it into your document (pdfLaTeX, LaTeX/dvips/ps2pdf):
\usepackage{movie15}
...
\includemovie[poster]{.5\linewidth}{.754\linewidth}{urlimage.smil}
3.) Open the final PDF document with Adobe Reader on Windows or Mac
(QuickTime required). The image will be loaded from its URL once, upon
opening the page containing it for the first time. If you later go back
to the same page, the image will be immediately visible.
Alexander
Read about \DeclareGraphicsRule in grfguide. Look at programs wget and curl.
--
Donald Arseneau as...@triumf.ca
> "rolandw" <rolandw...@gmail.com> writes:
>
>> I need to embed images from an URL into my TeX document. Instead of:
>>
>> \includegraphics{myImage}
>>
>> I would like to be able to do something like:
>>
>>
>>
\includegraphicsfromurl{http://groups-beta.google.com/groups/img/3/groups_bar.gif}
>>
>> Any suggestions?
>
>
> Read about \DeclareGraphicsRule in grfguide.
Possibly not useful in this case. I would write my own macro, which includes
an ordinary \includegraphics
> Look at programs wget and
> curl.
Yup. Use wget/curl/... to do the download to a temporary. Then use it.
You could write a macro that writes a bash script to do the download. Your
\includegraphicsurl calculates the local EPS file name, e.g.
tmp/url_1.eps,tmp/url_2.eps,... . It includes this if the file is present,
else it writes to a bash script file. You run this bash script and rerun
TeX.
--
Eric
> Donald Arseneau wrote:
>
> > "rolandw" <rolandw...@gmail.com> writes:
> >> I would like to be able to do something like:
> >>
> \includegraphicsfromurl{http://groups-beta.google.com/groups/img/3/groups_bar.gif}
> >
> > Read about \DeclareGraphicsRule in grfguide.
>
> Possibly not useful in this case. I would write my own macro, which includes
> an ordinary \includegraphics
I was guessing that someone can use `wget in \DeclareGraphicsRule,
but there has to be a findable file with some extension before TeX
will execute the procedure given in the rule.
--
Donald Arseneau as...@triumf.ca
> I was guessing that someone can use `wget in \DeclareGraphicsRule,
> but there has to be a findable file with some extension before TeX
> will execute the procedure given in the rule.
\AtBeginDocument{\write18{wget -c http://somehost.com/image.jpeg}}
might do the job of fetching the file once (wget option -c), and
hopefully, well before executing \includegraphics.
Alexander
As Donald has written, this can be automated by the last argument
of \DeclareGraphicsRule. See also package epstopdf for pdfTeX.
Yours sincerely
Heiko <ober...@uni-freiburg.de>