I have a PDF file which sets the values of several fields on loading based on a form the user fills out on a webpage. I need to set these fields with different data values each time the PDF is opened. I'd prefer to do this with something like localStorage
but I'm not sure how to access localStorage
from the PDF JavaScript (or if that's even possible). The fields may be quite long—I'm avoiding sending the data in the URL as a query string (e.g. ...doc.pdf?title=Doc
), which may exceed browser URL character limits.
Is there a way to access localStorage
or another local browser data storage system using PDF JavaScript? If not, is there a better way I can go about this?
I'm using Acrobat 15 to add JavaScript to my PDF. I will only need to open the resulting PDF in a browser. However, cross-browser solutions are preferred.