Code Monkey home page Code Monkey logo

win32printer's Introduction

win32printer

A tool to print via the commandline on windows.

Install

Install python 2.7

Add environment variables on Windows for C:\Python27, C:\Python27\Scripts

Install libs

pip install pypiwin32
pip install Pillow

Run

C:\Python27\python.exe C:\path\to\win32print\print.py -i "C:\path\to\picture.jpg"

Run via linux

This tool was intended to use a printer that does not have drivers for linux.

We installed a VirtualBox on linux, and then run print commands with winexe.

Install

Install winexe

sudo apt-get install winexe

Authorize remote desktop on windows.

Run

And then you can run

winexe -U HOME/admin%password //192.168.1.xx 'C:\Python27\python.exe C:\path\to\win32print\print.py -i "C:\path\to\picture.jpg"'

troubleshooting

If you see authorization error, try

turn off UAC remote restrictions

if it still does not work, try

turn off UAC completely

if it still does not work, try to disable firewalls, and make the network private instead of public.

win32printer's People

Stargazers

DJZhou avatar 白月秋见心 avatar Bill Hu avatar liyao avatar

Watchers

Gabriel avatar James Cloos avatar  avatar hugohil avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.