-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to print files #10
Comments
Thank you for nice words about my work. I googled AddJob usage, and I cannot find any good examples. This package uses WritePrinter Windows API. Why do we also need AddJob? What does AddJob do, that cannot be done by WritePrinter? Thank you. Alex |
No worries, appreciate this library, it may prove very useful. My understanding of Whereas This may be a misunderstanding on my part of the way |
...In addition, doesn't |
That is how I understand WriterPrinter usage too.
Sure. But nowhere does it say that the file you are providing can contain PDF or DOCX either. Am I wrong?
I am not familiar with this software. I would not know how it works.
You can do that. Or you could insert 'page break' in between bytes you send to the printer. Most printers support form feed - https://en.wikipedia.org/wiki/Page_break Alex |
Ok... let me amend my request sightly. How can I print any arbitrary file using your library please? Your example does not work with files which aren't |
I don't think it is possible. I created this package to print text files - all printers I used print my text files with no problem. I have not tried to print PDF or DOCX files. Alex |
i would also like to be able to print images and pds's. Hope this somehow gets resolved. |
As a note, I have been using code from this library to print PDFs for quite some time now. However, I am using a xerox workcenter 7435 which does understand PDF on its own. It may be easier to find a driver for your printer to read the bytes and convert it to print PDF. |
Bypassing the printer driver and using the Windows Printer Spool API allows you to pass in a file path and print the file however it should be handled (covers PDF, DOCX, XLSX, txt files which would usually need different approaches when processed by the driver).
Particularly the AddJob function allows a job with a file path.
It feels like the last little part missing in this brilliant library!
The text was updated successfully, but these errors were encountered: