send binary data (image) to printer using curl ..!
i am trying to send an image file to printer using curl. I am using curl command line tool for this and the command i used is "cu开发者_C百科rl --data-binary @filename ip:port". But this doesn't work. Any help would be appreciated..
The data to be printed also needs to be passed in a format that the printer can understand, just throwing a JPEG into an IPP request may not be enough; it may need conversion to something like Postscript, PCL, or else, instead.
Most cases of file uploads from a form in HTML and over HTTP use multipart formposts. You do such posts with curl using a number of -F on the command line.
As always, start out by reading this guide on how to script with HTTP:
http://curl.haxx.se/docs/httpscripting.html
精彩评论