1075 1 0 0
Last Updated : 2025-04-29 00:17:20
In case you want to directly print a pdf file from the browser in Laravel, here is a snippet of code that might help you do it.
let print = (doc) => {
let objFra = document.createElement('iframe'); // Create an IFrame.
objFra.style.visibility = 'hidden'; // Hide the frame.
objFra.src = doc; // Set source.
document.body.appendChild(objFra); // Add the frame to the web page.
objFra.contentWindow.focus(); // Set focus.
objFra.contentWindow.print(); // Print it.
}
print("{{url('openBillEventDocumentsFederal')}}"+"/"+dbId+"/"+fileField);?