Closed rohitatcoffee closed 1 year ago
const responseBlob = new Blob([pdfBlob], { type: 'application/pdf' }); const fileURL = URL.createObjectURL(responseBlob); setPreview(false); // printJS(fileURL); printJS({ type: 'pdf', printable: fileURL, });
Trying to print a pdf receipt, but it adds empty spaces on top and bottom.
How I can remove these spaces?
Note: PDF does not have margin on the top and bottom
@rohitatcoffee try it https://developer.mozilla.org/en-US/docs/Web/CSS/@page
const responseBlob = new Blob([pdfBlob], { type: 'application/pdf' }); const fileURL = URL.createObjectURL(responseBlob); setPreview(false); // printJS(fileURL); printJS({ type: 'pdf', printable: fileURL, });
Trying to print a pdf receipt, but it adds empty spaces on top and bottom.
How I can remove these spaces?
Note: PDF does not have margin on the top and bottom