I am using Xubuntu 16.04. I was unable to properly configure the drivers for a Xerox 7545 to print with a Default Group account setup. However, I am able to print by saving my document as a PDF. Then I can go to the IP address of the printer in the browser. There I can submit a web form for printing.
I would like to integrate a cURL command into a script to make the printing process more efficient. I am confident that my cURL syntax is good. (I was able to successfully print to a different printer.)
curl -F "frmFileUpload=@/home/brock/Desktop/example.pdf" -F "frmUserId=####" http://###.##.##.###/print/print.php?submitted=true
However, I believe my print job keeps getting deleted. On the webpage where you submit the print job, there is this message: "Note: Please wait for Job Submission confirmation window before navigating to another page. Otherwise, job will be deleted."
When I submit on the webpage, the page loads (for the form to submit). Then a small dialog box pops up:
The submission page has two
<form></form> sections. The following contains the file upload field.
<form enctype="multipart/form-data" action="/upload/xerox.set" method="post">
This following contains the User ID field, number of copies, etc.
<form action="#" method="post">
Here is the submit button.
<button type="button" onclick="SubmitForm();">Submit Job</button>
Here is the source code for the
SubmitForm() function. The function begins on line 144 and ends on line 482.
When I submit the form using cURL and I later run
echo $? it returns
0 for no error. I have tried using the two other
action URLs as well as the URL of the page itself. The URL in the command above is from doing inspect element and viewing the network tab during submission.
I think the issue is this: "Note: Please wait for Job Submission confirmation window before navigating to another page. Otherwise, job will be deleted."