[semi-OT] PDF on the fly

Ralph DiMola rdimola at evergreeninfo.net
Wed Sep 14 15:14:49 EDT 2022

How fortuitous...

I just ran into this while doing JavaScript xhttp network requests to LC
Server on Safari only. I just updated from LC Server 9.5.1. to 9.6.6. I saw
it in Safari in iOS. Chrome in iOS worked OK. I went back to 9.5.1 and
everything started working again in Safari. Do we possibly have the same

This might not be OT at all.

Ralph DiMola
IT Director
Evergreen Information Services
rdimola at evergreeninfo.net

-----Original Message-----
From: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] On Behalf
Of jbv via use-livecode
Sent: Wednesday, September 14, 2022 2:58 PM
To: How to use LiveCode
Cc: jbv at souslelogo.com
Subject: [semi-OT] PDF on the fly

Hi list,

I have a web site on which end users can select several options, and then
click a button "show PDF", and a pdf containing various contents from a
remote DB with a sophisticated layout is built server side in a second and
automatically downloaded.

The link of the button is something like :
and the script sets the header of the pdf file as follows :
   put header "Content-Type: application/pdf"
   put header "Content-Length: " & number of chars of myPDF
   put header "Content-Disposition: attachment; filename=" &quote&
myFileName &quote

This has been working fine for years, and still works on Chrome and FF, but
apparently the latest versions of Safari don't accept it:
the file is built and the download starts but quickly stalls and that's it.
And no error message van be found in the console.

As an alternative solution, I've been thinking of building the pdf server
side and writing it in a temporary folder, and then on the web page
displaying a prompt with a button containing the actual url of the file. But
that's not very elegant IMHO.

What other options do I have ?
Thank you in advance.


use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription

More information about the use-livecode mailing list