ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* issue attaching remote files
@ 2019-11-04 17:26 Pablo Rodriguez
  2019-11-04 18:02 ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Pablo Rodriguez @ 2019-11-04 17:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Hans,

I have the following sample:

    \setupinteraction[state=start]
    \starttext
    \startTEXpage[offset=1em]
    \attachment
        [file={https://eur-lex.europa.eu/legal-content/%
            ES/TXT/PDF/?uri=CELEX:02010L0040-20180109},
         name=one.pdf,
         color=orange]
    \attachment
        [file={https://eur-lex.europa.eu/legal-content/%
            ES/TXT/PDF/?uri=CELEX:52011DC0144R(02)},
         name=two.pdf,
         color=magenta]
    \stopTEXpage
    \stoptext

Because of the parentheses in the file address, the second file isn’t
attached, due to the use of parentheses (sorry, but I cannot avoid this
in their address).

curl is also unable to download the second file unless an output name is
specified (with --output or -o).

Would it be possible that ConTeXt could handle the second address with
parentheses to attach the file to a PDF document?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: issue attaching remote files
  2019-11-04 17:26 issue attaching remote files Pablo Rodriguez
@ 2019-11-04 18:02 ` Hans Hagen
  2019-11-05  7:16   ` Pablo Rodriguez
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2019-11-04 18:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 11/4/2019 6:26 PM, Pablo Rodriguez wrote:
> Hi Hans,
> 
> I have the following sample:
> 
>      \setupinteraction[state=start]
>      \starttext
>      \startTEXpage[offset=1em]
>      \attachment
>          [file={https://eur-lex.europa.eu/legal-content/%
>              ES/TXT/PDF/?uri=CELEX:02010L0040-20180109},
>           name=one.pdf,
>           color=orange]
>      \attachment
>          [file={https://eur-lex.europa.eu/legal-content/%
>              ES/TXT/PDF/?uri=CELEX:52011DC0144R(02)},
>           name=two.pdf,
>           color=magenta]
>      \stopTEXpage
>      \stoptext
> 
> Because of the parentheses in the file address, the second file isn’t
> attached, due to the use of parentheses (sorry, but I cannot avoid this
> in their address).
> 
> curl is also unable to download the second file unless an output name is
> specified (with --output or -o).
> 
> Would it be possible that ConTeXt could handle the second address with
> parentheses to attach the file to a PDF document?
hm i see both files in the cache (under trees)

i also see both embedded

btw these are weird files (1) pdf 1.4 which afaik doesn't permit tags, 
(2) imo invalid object references are used, (3) the files are pretty 
inefficient, and let's not talk about how bad they look (ok, that is of 
course subjective, but still ... a kind of braindead job for tex to 
generate such files)

Hans



-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: issue attaching remote files
  2019-11-04 18:02 ` Hans Hagen
@ 2019-11-05  7:16   ` Pablo Rodriguez
  2019-11-05  8:42     ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Pablo Rodriguez @ 2019-11-05  7:16 UTC (permalink / raw)
  To: ntg-context

On 11/4/19 7:02 PM, Hans Hagen wrote:
> On 11/4/2019 6:26 PM, Pablo Rodriguez wrote:
>> [...]
>> Would it be possible that ConTeXt could handle the second address with
>> parentheses to attach the file to a PDF document?
>
> hm i see both files in the cache (under trees)
>
> i also see both embedded

I tested this on a Windows 64bit machine and both files are embedded
(with MkIV and LMTX).

I have tested it again in Linux 64bit with brand new MkIV and LMTX
installations and only a file is embedded.

I don’t know what may be the difference here between Linux and Windows.

> btw these are weird files (1) pdf 1.4 which afaik doesn't permit tags,
> (2) imo invalid object references are used, (3) the files are pretty
> inefficient, and let's not talk about how bad they look (ok, that is of
> course subjective, but still ... a kind of braindead job for tex to
> generate such files)

I’m afraid that outside the TeX world having a PDF file that reflects
what is displayed on screen is enough for most of the users.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: issue attaching remote files
  2019-11-05  7:16   ` Pablo Rodriguez
@ 2019-11-05  8:42     ` Hans Hagen
  2019-11-05 13:42       ` Pablo Rodriguez
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2019-11-05  8:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Pablo Rodriguez

On 11/5/2019 8:16 AM, Pablo Rodriguez wrote:
> On 11/4/19 7:02 PM, Hans Hagen wrote:
>> On 11/4/2019 6:26 PM, Pablo Rodriguez wrote:
>>> [...]
>>> Would it be possible that ConTeXt could handle the second address with
>>> parentheses to attach the file to a PDF document?
>>
>> hm i see both files in the cache (under trees)
>>
>> i also see both embedded
> 
> I tested this on a Windows 64bit machine and both files are embedded
> (with MkIV and LMTX).
> 
> I have tested it again in Linux 64bit with brand new MkIV and LMTX
> installations and only a file is embedded.
> 
> I don’t know what may be the difference here between Linux and Windows.

me neither ... you can try in data-crl to replace the template

     template = '--silent --insecure --create-dirs --output 
"%cachename%" "%original%"',

so that it uses quotes

>> btw these are weird files (1) pdf 1.4 which afaik doesn't permit tags,
>> (2) imo invalid object references are used, (3) the files are pretty
>> inefficient, and let's not talk about how bad they look (ok, that is of
>> course subjective, but still ... a kind of braindead job for tex to
>> generate such files)
> 
> I’m afraid that outside the TeX world having a PDF file that reflects
> what is displayed on screen is enough for most of the users.
> 
> Many thanks for your help,
> 
> Pablo
> --
> http://www.ousia.tk
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
> 


-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: issue attaching remote files
  2019-11-05  8:42     ` Hans Hagen
@ 2019-11-05 13:42       ` Pablo Rodriguez
  0 siblings, 0 replies; 5+ messages in thread
From: Pablo Rodriguez @ 2019-11-05 13:42 UTC (permalink / raw)
  To: ntg-context

On 11/5/19 9:42 AM, Hans Hagen wrote:
> On 11/5/2019 8:16 AM, Pablo Rodriguez wrote:
>> [...]
>> I don’t know what may be the difference here between Linux and Windows.
>
> me neither ... you can try in data-crl to replace the template
>
>      template = '--silent --insecure --create-dirs --output
> "%cachename%" "%original%"',
>
> so that it uses quotes

Hans,

this solves the issue.

I also replaced it in data-sch.lua.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-11-05 13:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-04 17:26 issue attaching remote files Pablo Rodriguez
2019-11-04 18:02 ` Hans Hagen
2019-11-05  7:16   ` Pablo Rodriguez
2019-11-05  8:42     ` Hans Hagen
2019-11-05 13:42       ` Pablo Rodriguez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).