Jun-06-2022, 11:48 AM
Jun-06-2022, 12:33 PM
Not a Windows user here, but obviously it exists somewhere in Mark Hammond's pywin32 module.
Jun-06-2022, 02:00 PM
What GUI are you using? QT has some nice printer dialog management tools...
Jun-08-2022, 01:29 PM
I am using Kivy as a GUI. In the app i am running/displaying some data table sorts. As an afterthought I wanted to give the user the ability to print out their search so I save data in a text file and have a simple print command for either a Linux or WIn platform to print out.
def print_to_screen(self,instance):
try:
if platform=='linux':
os.system('lp -o media=letter -o fit-to-page -o landscape search.txt')
if platform=='win':
os.startfile("search.txt", "print")
The command for Linux is satisfactory for now however in Windows I need to either fit-to-page or change to landscape. I am inexperienced in printing and have not found a way on the windows os print command to add the landscape requirement.
Being inexperienced, I thought the Windows system already had a Print Dialogue and Page Setup Dialogue that I could just call from my app and feed it my text file and the user could modify as needed vs. using above.
So for now if I could just get above to print in landscape I could get by.
Printing looks like it can get involved.
Thanks to all.
def print_to_screen(self,instance):
try:
if platform=='linux':
os.system('lp -o media=letter -o fit-to-page -o landscape search.txt')
if platform=='win':
os.startfile("search.txt", "print")
The command for Linux is satisfactory for now however in Windows I need to either fit-to-page or change to landscape. I am inexperienced in printing and have not found a way on the windows os print command to add the landscape requirement.
Being inexperienced, I thought the Windows system already had a Print Dialogue and Page Setup Dialogue that I could just call from my app and feed it my text file and the user could modify as needed vs. using above.
So for now if I could just get above to print in landscape I could get by.
Printing looks like it can get involved.
Thanks to all.
Jun-08-2022, 07:07 PM
Sorry, found answers in wxPython and PyQt but not Kivy. Perhaps someone else...