1

I have to share presentation slides with a co-worker. They are created daily in ConTeXt.

Throughout the slides, I have placed \date, which is an important part of the slides, but that is the date when compiled.

I compile the slides at the start of a presentation, but my co-worker doesn't know how to compile them herself and might use them on different days.

Is there a way to put a "live" changing date in the slide, that shows today's date, no matter what day the PDFs are opened?

Village
  • 13,603
  • 23
  • 116
  • 219
  • That "feature" requires a reader such as acrobat to process the tag and render the date of opening (many more secure reader will refuse to activate such scripting as a security risk, and many companies lock down such behaviour in acrobat) There are ways to simply over write the page content (eg insert a daily cover) but if the reader does not know what day of the week it is then its a poor show. Personally I have never seen the point of pages that simply confirm the current time Its bad enough that people trust the pdf publish/signed date as long as its not say built on independence day 1776. –  May 07 '19 at 01:19
  • 2
    It's possible to make a file in the directory (.bat in Windows, .command in MacOS) that when double clicked calls the appropriate command line argument to compile the file. You could have your co-worker double click that at the start of the day to get the right date displayed. You do have to cross your fingers that there are no compilation errors with this method. – Teepeemm May 07 '19 at 01:27
  • @Teepeemm +1 I love the suggestion to simplify however it would be much simpler to have 14 pdf pages compiled for the next fortnight and skip those not needed then there is no risk of any delay should it go wrong. –  May 07 '19 at 01:37
  • There are some related suggestions here https://tex.stackexchange.com/questions/160731/how-to-autoupdate-date-on-beamer-pdf https://tex.stackexchange.com/search?tab=newest&q=form%20field%20pdf%20date and a good relevant answer how to generate date in acrobat from David Purton here https://tex.stackexchange.com/questions/468470/put-last-modified-date-on-the-pdf-form-generated-by-markdown-hyperref-javasc see also https://forums.adobe.com/thread/2129661 –  May 07 '19 at 02:01
  • Use package tdclock – Vaibhav May 07 '19 at 02:35
  • There is a chapter on JavaScript in the Interaction manual but JS support in viewers is sparse and pretty bad. Most viewers don't have it and those who have it often turn it off because of security problems. – Henri Menke May 07 '19 at 04:12
  • You could insert a remote image reference at the position of your \today command in the file as PDF literal, and update that image daily - either through ConTeXt or as postprocessing with pdftk or similar. See https://stackoverflow.com/questions/36318312/pdf-with-an-external-image-using-xobject, https://tex.stackexchange.com/questions/277984/superellipse-with-pdfliterals, https://tex.stackexchange.com/questions/213655/insert-and-ref-uncompressed-pdf-literals-in-latex-document. – Marijn May 07 '19 at 09:13
  • If you really wanted to, you could convert each page of your pdf into svg (pdftocairo -svg SomeFile.pdf SomeFile.svg iterated over every page). Then embed each page's svg code into an html file and add some javascript to make the date dynamic (you'd have to find the date in the svg file's ad hoc (?) text encoding…). Then instruct your co-worker to present the slides using a web browser in fullscreen mode. –  May 07 '19 at 16:24

0 Answers0