Instead of getting printer in the code, use exsiting function.
Attach a file by drag & drop or click to upload