I have tried to print PDF by using print.js library and it's working fine for single PDF print. now when I am trying to print multiple PDFs, it's throwing an error: ERROR Multiple Choices.. also, I have tried with plain JS but it prompts multiple times for multiple documents.
Below is the code we are using.
printJS({
printable: ['dummy.pdf', 'dummy1.pdf'],
type:'pdf'
});
please find the attachment.
Finally, after spending 1 week, I am able to print multiple PDF's using print.js in angular 9. Below are the following steps to print multiple pdfs:
Install npm module: PDF-lib
npm i pdf-lib
import npm module in the angular file and merge multiple pdfs into single pdfs using below code(say app.components.ts)
Call the function for print (app.component.html)
<button (click)="printPDFS()">print pdfs</button>
Reference: pdf-lib