• =?UTF-8?Q?MessageBoxPopUp_in_PDF_made_by_PostScript=E2=80=99s_pdfmar?=

    From jdaw1@21:1/5 to All on Mon Aug 23 15:44:19 2021
    I’m generating a PDF from PostScript. I might generate one, upload it, and have others check it. It might be updated. And re-updated. Then somebody is to print it, and, sometimes, what is printed is a cached old version. Ouch!

    One solution — rejected for this problem — would be to have many separate file names. Not good: there should be a single canonical-seeming file name; and the drafts should not have a permanent life.

    A different technique is something I don’t know how to do. In the PDF, presumably added via `pdfmark`, could there be something like the following pseudocode?

    ```
    On Open
    {
    If Today ≤ HardWiredDateConstantBeingDateOfTasting
    {
    MessageBoxPopUp
    string="This version HardWiredStringConstant: check that is latest with a force-reload."
    Buttons={"OK, checked"}
    }
    }
    ```

    If any readers of comp.lang.postscript know how to pdfmark that, pls do say. Thank you.

    Relevant links:
    http://github.com/jdaw1/placemat/issues/152 http://www.theportforum.com/viewtopic.php?t=175&p=112066#p112066

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From luser droog@21:1/5 to All on Thu Aug 26 16:21:22 2021
    On Monday, August 23, 2021 at 5:44:20 PM UTC-5, jdaw1 wrote:
    I’m generating a PDF from PostScript. I might generate one, upload it, and have others check it. It might be updated. And re-updated. Then somebody is to print it, and, sometimes, what is printed is a cached old version. Ouch!

    One solution — rejected for this problem — would be to have many separate file names. Not good: there should be a single canonical-seeming file name; and the drafts should not have a permanent life.

    A different technique is something I don’t know how to do. In the PDF, presumably added via `pdfmark`, could there be something like the following pseudocode?

    ```
    On Open
    {
    If Today ≤ HardWiredDateConstantBeingDateOfTasting
    {
    MessageBoxPopUp
    string="This version HardWiredStringConstant: check that is latest with a force-reload."
    Buttons={"OK, checked"}
    }
    }
    ```

    If any readers of comp.lang.postscript know how to pdfmark that, pls do say. Thank you.

    Relevant links:
    http://github.com/jdaw1/placemat/issues/152 http://www.theportforum.com/viewtopic.php?t=175&p=112066#p112066

    This might not be very portable, but IIRC with acrobat you can embed JavaScript.
    I'm not sure what flavor of JS it uses nor what functions are available.

    But, using that you could have a file called maybe "last-revision.txt" with just the
    timestamp of the latest version. Then your JS code could fetch the file and compare
    to the hard wired constant.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)