Answer the question
In order to leave comments, you need to log in
What is the best way to implement automatic PDF printing in ie8?
Dear, please tell me - you need to implement the following case:
The user clicks on the Print button The
loader is launched blocking the work with the form The
request to the REST service with custom headers (important), the service returns PDF The
automatic printing of the received PDF is launched The
loader is closed
This should work in ie8
Now similar implemented using activeX pdf.ocx from Adobe Acrobat - but it is extremely primitive, does not contain a callback to the end of the rest loading (there is no way to close the loader correctly), cannot add custom headers
...
const print= '<OBJECT CLASSID="clsid:CA8A9780-280D-11CF-A24D-444553540000"'
+ 'id="' + uid + '" width="0" height="0" >'
+ '<PARAM NAME="src" VALUE="' + url + '">'
+ '</OBJECT>';
document.body.insertAdjacentHTML('beforeEnd', print);
const doc = document.getElementById(uid);
doc.contentDocument.printAll();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question