* Opening external documents with external application @ 2013-01-07 18:45 Matthias Weber 2013-01-07 20:52 ` Wolfgang Schuster 0 siblings, 1 reply; 9+ messages in thread From: Matthias Weber @ 2013-01-07 18:45 UTC (permalink / raw) To: mailing list for ConTeXt users Dear All, I used to write \goto{\externalfigure[cuteimage]}[program(file.ext)] to get an image, that, when clicked, will open an application that will open file.ext. This currently still works on my Mac (10.8) with the TeXShop preview and with Skim. I does not work anymore with Adobe Acrobat Reader. Acrobat now asks permission, but doesn't do anything when granted. Even worse, on another Mac with an older OS, Skim didn't open the hyperlink either. On Windows, I couldn't find any program that would do the job, by I don't know much about that part of the world. Is there anything that has changed recently in the way these kind of hyperlinks must be written? (I use MkII) Thanks, Matthias ___________________________________________________________________________________ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Opening external documents with external application 2013-01-07 18:45 Opening external documents with external application Matthias Weber @ 2013-01-07 20:52 ` Wolfgang Schuster 2013-01-08 0:00 ` Was: Opening external documents ... -> Can ConTeXt reduce size of images? Matthias Weber 0 siblings, 1 reply; 9+ messages in thread From: Wolfgang Schuster @ 2013-01-07 20:52 UTC (permalink / raw) To: mailing list for ConTeXt users Am 07.01.2013 um 19:45 schrieb Matthias Weber <matweber@indiana.edu>: > Dear All, > > I used to write > > \goto{\externalfigure[cuteimage]}[program(file.ext)] > > to get an image, that, when clicked, will open an application that will open file.ext. > > This currently still works on my Mac (10.8) with the TeXShop preview and with Skim. > I does not work anymore with Adobe Acrobat Reader. Acrobat now asks permission, but doesn't > do anything when granted. Even worse, on another Mac with an older OS, Skim didn't open > the hyperlink either. On Windows, I couldn't find any program that would do the job, by I don't > know much about that part of the world. > > Is there anything that has changed recently in the way these kind of hyperlinks must be written? > (I use MkII) Your chance to get an answer will increase with a *working* minimal example. Wolfgang ___________________________________________________________________________________ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Was: Opening external documents ... -> Can ConTeXt reduce size of images? 2013-01-07 20:52 ` Wolfgang Schuster @ 2013-01-08 0:00 ` Matthias Weber 2013-01-08 1:09 ` Hans Hagen 0 siblings, 1 reply; 9+ messages in thread From: Matthias Weber @ 2013-01-08 0:00 UTC (permalink / raw) To: mailing list for ConTeXt users Thanks Wolfgang - I believed that the question was easy enough as is, but that was of course short sighted. The problem I described does not arise when one just typesets the file, everything is good. What I did was to reduce its file size using OS X's preview. This has apparently been "improved" so that it changes the behavior wrt external links. In case somebody wants to try: Typeset \setupinteraction[page=yes,state=start] \starttext \goto{click}[program(test.tex)] \stoptext Open test.pdf with Acrobat. Clicking on "click" opens test.tex with your designated TeX editor. Close file in Acrobat. Open test.pdf in Preview (OS 10.8, I am sure it behaved differently in earlier versions). Export with "reduce file size" as option checked Open exported file in Acrobat. Clicking on "click" will try to access the absolute file path of the previously relative link. In the best case, the finder will point to that file (instead of opening it). In the worst case, it will not be found. So, this clearly is not a ConTeXt problem. But it causes me major headaches. In my workflow, I have dozens of images that I prepare with Adobe Illustrator and save as pdf files that are still editable with Illustrator, i.e. that include another copy of the file with layers etc. In other words, my pdf images are about 10 times as big as they need to be. I usually just reduce the file size with preview. As this seems to be erroneous now, I am wondering: Is there an option in \externalfigure that will strip everything redundant from a pdf file? Thanks again, Matthias On Jan 7, 2013, at 3:52 PM, Wolfgang Schuster <wolfgang.schuster@gmail.com> wrote: > > Am 07.01.2013 um 19:45 schrieb Matthias Weber <matweber@indiana.edu>: > >> Dear All, >> >> I used to write >> >> \goto{\externalfigure[cuteimage]}[program(file.ext)] >> >> to get an image, that, when clicked, will open an application that will open file.ext. >> >> This currently still works on my Mac (10.8) with the TeXShop preview and with Skim. >> I does not work anymore with Adobe Acrobat Reader. Acrobat now asks permission, but doesn't >> do anything when granted. Even worse, on another Mac with an older OS, Skim didn't open >> the hyperlink either. On Windows, I couldn't find any program that would do the job, by I don't >> know much about that part of the world. >> >> Is there anything that has changed recently in the way these kind of hyperlinks must be written? >> (I use MkII) > > Your chance to get an answer will increase with a *working* minimal example. > > Wolfgang > ___________________________________________________________________________________ > 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://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___________________________________________________________________________________ ___________________________________________________________________________________ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Was: Opening external documents ... -> Can ConTeXt reduce size of images? 2013-01-08 0:00 ` Was: Opening external documents ... -> Can ConTeXt reduce size of images? Matthias Weber @ 2013-01-08 1:09 ` Hans Hagen 2013-01-08 23:04 ` Matthias Weber 2013-01-08 23:34 ` Martin Schröder 0 siblings, 2 replies; 9+ messages in thread From: Hans Hagen @ 2013-01-08 1:09 UTC (permalink / raw) To: mailing list for ConTeXt users; +Cc: Matthias Weber On 1/8/2013 1:00 AM, Matthias Weber wrote: > So, this clearly is not a ConTeXt problem. But it causes me major headaches. In my workflow, I have dozens of images > that I prepare with Adobe Illustrator and save as pdf files that are still editable with Illustrator, i.e. that include another copy of the > file with layers etc. In other words, my pdf images are about 10 times as big as they need to be. I usually just reduce the file size with preview. > As this seems to be erroneous now, I am wondering: it's even worse ... all kind of color and other data is present is such a file .. the pstopdf.rb script (comes with mkii) gets rid of some of that normally at pragma we do such things either automatically (when graphics are put in repositories) or with acrobat in batch mode (doable if you get the graphics in advance) because doing such thing smanually for thousands of images is no fun you can play with this: \startluacode local gsp = os.type == "windows" and "gswin32c" or "gs" local gsc = "%s -q -dEPSCrop -sDEVICE=pdfwrite -dNOPAUSE -dSAFER -dNOCACHE -dBATCH -dProcessColorModel=/DeviceCMYK -sOutputFile=%s %s -c quit" local pdp = "pdftops -eps %s %s" figures.converters.pdf = { xxx = function(oldname,newname) local tmpname = oldname .. ".ps" local command = string.format(pdp,oldname,tmpname) os.execute(command) local command = string.format(gsc,gsp,newname,oldname) os.execute(command) end } figures.registersuffix("xxx","pdf") \stopluacode \starttext \externalfigure[cow.pdf][conversion=xxx] \stoptext pdftops comes with xpdf (also in minimals) if needed I can add a standard converter for it Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Was: Opening external documents ... -> Can ConTeXt reduce size of images? 2013-01-08 1:09 ` Hans Hagen @ 2013-01-08 23:04 ` Matthias Weber 2013-01-08 23:30 ` Hans Hagen 2013-01-08 23:34 ` Martin Schröder 1 sibling, 1 reply; 9+ messages in thread From: Matthias Weber @ 2013-01-08 23:04 UTC (permalink / raw) To: mailing list for ConTeXt users Thanks Hans, I'll give this a try when I am in a daring mood and less busy. Matthias On Jan 7, 2013, at 8:09 PM, Hans Hagen <pragma@wxs.nl> wrote: > On 1/8/2013 1:00 AM, Matthias Weber wrote: > >> So, this clearly is not a ConTeXt problem. But it causes me major headaches. In my workflow, I have dozens of images >> that I prepare with Adobe Illustrator and save as pdf files that are still editable with Illustrator, i.e. that include another copy of the >> file with layers etc. In other words, my pdf images are about 10 times as big as they need to be. I usually just reduce the file size with preview. >> As this seems to be erroneous now, I am wondering: > > it's even worse ... all kind of color and other data is present is such a file .. the pstopdf.rb script (comes with mkii) gets rid of some of that > > normally at pragma we do such things either automatically (when graphics are put in repositories) or with acrobat in batch mode (doable if you get the graphics in advance) because doing such thing smanually for thousands of images is no fun > > you can play with this: > > \startluacode > local gsp = os.type == "windows" and "gswin32c" or "gs" > local gsc = "%s -q -dEPSCrop -sDEVICE=pdfwrite -dNOPAUSE -dSAFER -dNOCACHE -dBATCH -dProcessColorModel=/DeviceCMYK -sOutputFile=%s %s -c quit" > local pdp = "pdftops -eps %s %s" > > figures.converters.pdf = { > xxx = function(oldname,newname) > local tmpname = oldname .. ".ps" > local command = string.format(pdp,oldname,tmpname) > os.execute(command) > local command = string.format(gsc,gsp,newname,oldname) > os.execute(command) > end > } > > figures.registersuffix("xxx","pdf") > \stopluacode > > \starttext > > \externalfigure[cow.pdf][conversion=xxx] > > \stoptext > > pdftops comes with xpdf (also in minimals) > > if needed I can add a standard converter for it > > Hans > > > ----------------------------------------------------------------- > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com > | 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://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___________________________________________________________________________________ ___________________________________________________________________________________ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Was: Opening external documents ... -> Can ConTeXt reduce size of images? 2013-01-08 23:04 ` Matthias Weber @ 2013-01-08 23:30 ` Hans Hagen 2013-01-09 0:17 ` Marco Patzer 0 siblings, 1 reply; 9+ messages in thread From: Hans Hagen @ 2013-01-08 23:30 UTC (permalink / raw) To: mailing list for ConTeXt users; +Cc: Matthias Weber On 1/9/2013 12:04 AM, Matthias Weber wrote: > Thanks Hans, > > I'll give this a try when I am in a daring mood and less busy. the latest beta has this: % \enabletrackers[graphics.programs] \starttext \externalfigure[cow.pdf][conversion=stripped] \stoptext Of course I cannot guarantee that the pdf gets stripped, but at least it's tried. > Matthias > > On Jan 7, 2013, at 8:09 PM, Hans Hagen <pragma@wxs.nl> wrote: > >> On 1/8/2013 1:00 AM, Matthias Weber wrote: >> >>> So, this clearly is not a ConTeXt problem. But it causes me major headaches. In my workflow, I have dozens of images >>> that I prepare with Adobe Illustrator and save as pdf files that are still editable with Illustrator, i.e. that include another copy of the >>> file with layers etc. In other words, my pdf images are about 10 times as big as they need to be. I usually just reduce the file size with preview. >>> As this seems to be erroneous now, I am wondering: >> >> it's even worse ... all kind of color and other data is present is such a file .. the pstopdf.rb script (comes with mkii) gets rid of some of that >> >> normally at pragma we do such things either automatically (when graphics are put in repositories) or with acrobat in batch mode (doable if you get the graphics in advance) because doing such thing smanually for thousands of images is no fun >> >> you can play with this: >> >> \startluacode >> local gsp = os.type == "windows" and "gswin32c" or "gs" >> local gsc = "%s -q -dEPSCrop -sDEVICE=pdfwrite -dNOPAUSE -dSAFER -dNOCACHE -dBATCH -dProcessColorModel=/DeviceCMYK -sOutputFile=%s %s -c quit" >> local pdp = "pdftops -eps %s %s" >> >> figures.converters.pdf = { >> xxx = function(oldname,newname) >> local tmpname = oldname .. ".ps" >> local command = string.format(pdp,oldname,tmpname) >> os.execute(command) >> local command = string.format(gsc,gsp,newname,oldname) >> os.execute(command) >> end >> } >> >> figures.registersuffix("xxx","pdf") >> \stopluacode >> >> \starttext >> >> \externalfigure[cow.pdf][conversion=xxx] >> >> \stoptext >> >> pdftops comes with xpdf (also in minimals) >> >> if needed I can add a standard converter for it >> >> Hans >> >> >> ----------------------------------------------------------------- >> Hans Hagen | PRAGMA ADE >> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands >> tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com >> | 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://tex.aanhet.net >> archive : http://foundry.supelec.fr/projects/contextrev/ >> wiki : http://contextgarden.net >> ___________________________________________________________________________________ > > ___________________________________________________________________________________ > 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://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___________________________________________________________________________________ > -- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Was: Opening external documents ... -> Can ConTeXt reduce size of images? 2013-01-08 23:30 ` Hans Hagen @ 2013-01-09 0:17 ` Marco Patzer 0 siblings, 0 replies; 9+ messages in thread From: Marco Patzer @ 2013-01-09 0:17 UTC (permalink / raw) To: ntg-context [-- Attachment #1.1: Type: text/plain, Size: 844 bytes --] On 2013–01–09 Hans Hagen wrote: > the latest beta has this: > > % \enabletrackers[graphics.programs] > > \starttext > > \externalfigure[cow.pdf][conversion=stripped] > > \stoptext Nice feature, indeed. It might save a preprocessing step. We preprocess with -dProcessDSCComments=false otherwise PDFs generated by external programs (OpenOffice, I'm looking at you) in combination with particular fonts might wreak havoc with the document they are included into. I don't know which downsides this might have, though. In our workflow this leads to more predictable results. Maybe someone with more insight of the PDF internals could judge if it makes sense to add this option. It looks like the presets are not hard-coded. What is the interface to change the presets (screen, ebook, prepress)? Marco [-- Attachment #1.2: Digital signature --] [-- Type: application/pgp-signature, Size: 490 bytes --] [-- Attachment #2: Type: text/plain, Size: 485 bytes --] ___________________________________________________________________________________ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Was: Opening external documents ... -> Can ConTeXt reduce size of images? 2013-01-08 1:09 ` Hans Hagen 2013-01-08 23:04 ` Matthias Weber @ 2013-01-08 23:34 ` Martin Schröder 2013-01-09 0:56 ` Hans Hagen 1 sibling, 1 reply; 9+ messages in thread From: Martin Schröder @ 2013-01-08 23:34 UTC (permalink / raw) To: mailing list for ConTeXt users 2013/1/8 Hans Hagen <pragma@wxs.nl>: > it's even worse ... all kind of color and other data is present is such a > file .. the pstopdf.rb script (comes with mkii) gets rid of some of that We could reduce some of that during pdf inclusion (or use the new build-in pdf library). Best Martin ___________________________________________________________________________________ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Was: Opening external documents ... -> Can ConTeXt reduce size of images? 2013-01-08 23:34 ` Martin Schröder @ 2013-01-09 0:56 ` Hans Hagen 0 siblings, 0 replies; 9+ messages in thread From: Hans Hagen @ 2013-01-09 0:56 UTC (permalink / raw) To: mailing list for ConTeXt users On 1/9/2013 12:34 AM, Martin Schröder wrote: > 2013/1/8 Hans Hagen <pragma@wxs.nl>: >> it's even worse ... all kind of color and other data is present is such a >> file .. the pstopdf.rb script (comes with mkii) gets rid of some of that > > We could reduce some of that during pdf inclusion (or use the new > build-in pdf library). the library would then have to tweak a loaded pdf file which is a no-go with respect to mem usage also, some automatic reduction demands a constant adaption of the heuristics best keep away from that and leave it to other programs Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-01-09 0:56 UTC | newest] Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-01-07 18:45 Opening external documents with external application Matthias Weber 2013-01-07 20:52 ` Wolfgang Schuster 2013-01-08 0:00 ` Was: Opening external documents ... -> Can ConTeXt reduce size of images? Matthias Weber 2013-01-08 1:09 ` Hans Hagen 2013-01-08 23:04 ` Matthias Weber 2013-01-08 23:30 ` Hans Hagen 2013-01-09 0:17 ` Marco Patzer 2013-01-08 23:34 ` Martin Schröder 2013-01-09 0:56 ` Hans Hagen
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).