Copy link to clipboard
Copied
I have an application that is on 2 servers where form data from server #1 populates and creates a fill-in PDF on server #2
Server #1 - Railo server (Cant do PDF stuff)
Enter Info into Form > Submit Form to Server #2
Server #2 -Windows server with CF16 on it
Gets form field info and creates a PDF.
Now I want that PDF to be copied back to server #1.
How can I do that?
Do I save it on server #2 and then do some file transfer or can I save it back to server #1?
I agree with Dave Watts on this one. You could also use AJaX in a semi-sneaky way.
Ex: Replace the form submit button with a plain old regular button and use JavaScript to create an XHR (or use jQuery to $.post() the data) and submit to both servers (assuming server 1 retains the data in a database, or creates an email and sends it.) Server 1 will retain/email the data, server 2 will use a CFC to create the PDF and return it to the user for downloading.
OR, server 2 could create the PDF, retu
...Copy link to clipboard
Copied
You're not going to be able to just save it back to server one the way you're describing it. But there's no reason why you couldn't capture the data on server one, have server one send that data to server two via CFHTTP and get back the PDF, then save it temporarily on server one and serve it back to the original user. Note that PDF generation is slooooow, so you'll have to build a process that takes this into account.
Dave Watts, Eidolon LLC
Copy link to clipboard
Copied
I agree with Dave Watts on this one. You could also use AJaX in a semi-sneaky way.
Ex: Replace the form submit button with a plain old regular button and use JavaScript to create an XHR (or use jQuery to $.post() the data) and submit to both servers (assuming server 1 retains the data in a database, or creates an email and sends it.) Server 1 will retain/email the data, server 2 will use a CFC to create the PDF and return it to the user for downloading.
OR, server 2 could create the PDF, return a message to the client that an email is on its way, and email the PDF to the user.
V/r,
^ _ ^
Copy link to clipboard
Copied
I created the email on server#2 and sent an email with the attachment to the user. Thank you
Copy link to clipboard
Copied
Thank you for marking my answer as correct. I do appreciate it, and I'm sure a future user with the same issue will, too.
V/r,
^ _ ^