Jun-06-2022, 11:48 AM
I am trying to find documentation (in python) on how to initialize windows PRINTDLG and pass the structure to PrintDlg.
Thanks for any help.
Thanks for any help.
Initializing a PRINTDLG structure-how to
|
Jun-06-2022, 11:48 AM
I am trying to find documentation (in python) on how to initialize windows PRINTDLG and pass the structure to PrintDlg.
Thanks for any help.
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.
Jun-08-2022, 07:07 PM
Sorry, found answers in wxPython and PyQt but not Kivy. Perhaps someone else...
|
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
Auto-py-to-exe Stuck At 'Initializing' | killingtime | 5 | 11,004 |
Jan-21-2024, 10:52 PM Last Post: ShiDari |
|
"unexpected keyword arg" when initializing my subclasses | Phaze90 | 3 | 7,109 |
Nov-25-2022, 07:39 PM Last Post: Gribouillis |
|
Syntax when initializing empty lists | Mark17 | 2 | 2,278 |
Jun-02-2022, 04:09 PM Last Post: Mark17 |
|
Initializing, reading and updating a large JSON file | medatib531 | 0 | 2,817 |
Mar-10-2022, 07:58 PM Last Post: medatib531 |
|
Self re-initializing variable? | python_user_n | 6 | 4,746 |
May-03-2019, 02:52 PM Last Post: Gribouillis |