Hi Anders, Did you set the default printer in Browser Print? This is separate from the Windows Default printer.
getDefaultDevice is asynchronous, so the "After BrowserPrint" will almost always show up before the default device is found.
Past that, is the printer capable of taking PDF files? You need special software installed on the printer to print PDFs directly.
Once you have determined that, I would recommend using the sendUrl() function to send the PDF.
It makes sense that the "After BrowserPrint" alert is shown before the job is printed, since getDefaultDevice is asynchronous.
Regarding PDF files: Most of our users use something like a Zebra GK420d, but some use others. I have come to the conclusion now, that we can only send ZPL II or PNG|BMP|JPEG directly to the printer with the Browser Print SDK.
My current workaround is simply converting the PDF to PNG and then trying to send the PNG image to the printer. But this is of cause not ideal.
Do you have an example of sending a base 64 encoded PNG (or a HTML5 canvas element) to the printer using the Browser Print SDK?