on imposition and local or external files
Hi there, I would like to use imposition to rearrange an existing PDF as a booklet, but I don' have ConTeXt installed on the machine I would like to do it. Using http://live.contextgarden.net/ might do the job, but I have problems to load the local file. Is there any way to load a local file (or even an URL) with ConTeXt? How should I rewrite the following command to load a local file or an URL in ConteXt live? \insertpages[original_file.pdf][width=0pt] Thanks for your help, Pablo
Pablo Rodríguez wrote:
Hi there,
I would like to use imposition to rearrange an existing PDF as a booklet, but I don' have ConTeXt installed on the machine I would like to do it.
Using http://live.contextgarden.net/ might do the job, but I have problems to load the local file.
Is there any way to load a local file (or even an URL) with ConTeXt? How should I rewrite the following command to load a local file or an URL in ConteXt live?
In mkii, this is simply impossible. If you have the program "curl" installed, you can use an url as a file name in context mkiv. You cannot reach a local file from http://live.contextgarden.net, however (and that is a good thing). Best wishes, Taco
On Fri, Nov 7, 2008 at 11:03 AM, Taco Hoekwater
Pablo Rodríguez wrote:
Hi there,
I would like to use imposition to rearrange an existing PDF as a booklet, but I don' have ConTeXt installed on the machine I would like to do it.
Using http://live.contextgarden.net/ might do the job, but I have problems to load the local file.
Is there any way to load a local file (or even an URL) with ConTeXt? How should I rewrite the following command to load a local file or an URL in ConteXt live?
In mkii, this is simply impossible.
If you have the program "curl" installed, you can use an url as a file name in context mkiv.
curl as os.spawn ? Why don't use lua-curl http://luaforge.net/projects/lua-curl/ -- luigi
luigi scarso wrote:
On Fri, Nov 7, 2008 at 11:03 AM, Taco Hoekwater
mailto:taco@elvenkind.com> wrote: Pablo Rodríguez wrote: > Hi there, > > I would like to use imposition to rearrange an existing PDF as a > booklet, but I don' have ConTeXt installed on the machine I would like > to do it. > > Using http://live.contextgarden.net/ might do the job, but I have > problems to load the local file. > > Is there any way to load a local file (or even an URL) with ConTeXt? How > should I rewrite the following command to load a local file or an URL in > ConteXt live?
In mkii, this is simply impossible.
If you have the program "curl" installed, you can use an url as a file name in context mkiv.
curl as os.spawn ? Why don't use lua-curl http://luaforge.net/projects/lua-curl/
we have the socket library and at some point i'll rewrite the code to use that Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
luigi scarso wrote:
curl as os.spawn ? Why don't use lua-curl http://luaforge.net/projects/lua-curl/
300kb extra in the binary and an extra portability headache. Luatex actually includes the luasocket libraries, so that would be a better option, but it takes time to write the code for a http/ftp fetcher to replace curl completely. If you (or someone else) is interested in writing a replacement for luat-crl.lua, have a look at: http://www.tecgraf.puc-rio.br/~diego/professional/luasocket/ The bare bones usage (for http) is as simple as this: local http = require("socket.http") local content, responsecode, extra = http.request(arg[1]) io.write (content) but in real life, you have to deal with partial content, errors codes, url escaping, etc. etc. Best wishes, Taco
On Fri, Nov 7, 2008 at 11:52 AM, Taco Hoekwater
luigi scarso wrote:
curl as os.spawn ? Why don't use lua-curl http://luaforge.net/projects/lua-curl/
300kb extra in the binary
true
and an extra portability headache.
true and strongest than first.
Luatex actually includes the luasocket libraries, so that would be a better option, but it takes time to write the code for a http/ftp fetcher to replace curl completely.
If you (or someone else) is interested in writing a replacement for luat-crl.lua, have a look at:
no-no-no, it's difficult to compete with curl (IM(A)O) . -- luigi
On Fri, Nov 07 2008, Taco Hoekwater wrote:
curl as os.spawn ? Why don't use lua-curl http://luaforge.net/projects/lua-curl/
300kb extra in the binary and an extra portability headache.
I don't understand all the trouble... This works very well on live.contextgarden.net (luatex): \starttext bla \externalfigure[http://pmrb.free.fr/tmp/hacker.jpg] bla \stoptext Fetching a pdf instead of a jpg should be possible too, I believe... Cheers, Peter -- http://pmrb.free.fr/contact/
On Fri, Nov 07 2008, Pablo Rodríguez wrote:
Is there any way to load a local file (or even an URL) with ConTeXt? How should I rewrite the following command to load a local file or an URL in ConteXt live?
\insertpages[original_file.pdf][width=0pt]
I did not find any documentation about \insertpages[][] but I've just tried it out: \starttext \insertpages[http://meeting.contextgarden.net/2008/talks/% 2008-08-21-taco-luatex/luatex-talk.pdf][width=0pt] \stoptext It just works! Good luck, Peter -- http://pmrb.free.fr/contact/
Peter Münster wrote:
On Fri, Nov 07 2008, Pablo Rodríguez wrote:
Is there any way to load a local file (or even an URL) with ConTeXt? How should I rewrite the following command to load a local file or an URL in ConteXt live?
\insertpages[original_file.pdf][width=0pt]
I did not find any documentation about \insertpages[][] but I've just tried it out:
\starttext \insertpages[http://meeting.contextgarden.net/2008/talks/% 2008-08-21-taco-luatex/luatex-talk.pdf][width=0pt] \stoptext
It just works!
Many thanks for your help, Peter. Pablo
participants (5)
-
Hans Hagen
-
luigi scarso
-
Pablo Rodríguez
-
Peter Münster
-
Taco Hoekwater