+ 1

How to print pdf file in python? thanks

15th Feb 2017, 11:48 AM
‏â€ȘMungunkhuyag Zesnee
‏â€ȘMungunkhuyag Zesnee - avatar
4 Answers
+ 2
file = open("newfile.pdf", "w") file.write("This has been written to a file") file.close() file = open("newfile.pdf", "r") print(file.read()) file.close() try this let me know if it works
15th Feb 2017, 1:00 PM
Elite
Elite - avatar
+ 2
'Pdf' files format is a binary format, not a text format. To open if for read/write operations you need to open it in the binary mode, and know how encoding is done to manage it by yourself: let say that without library to handle / bind operations of read/write ^^
15th Feb 2017, 3:20 PM
visph
visph - avatar
0
I'd like to silent print the file.pdf to myself printers
15th Feb 2017, 1:06 PM
‏â€ȘMungunkhuyag Zesnee
‏â€ȘMungunkhuyag Zesnee - avatar
- 1
Hello everyone. how to get status of LPT printer port from python 27.
22nd May 2017, 1:11 PM
‏â€ȘMungunkhuyag Zesnee
‏â€ȘMungunkhuyag Zesnee - avatar