Python Forum
[Tkinter] load sqlite3 data into pdf
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] load sqlite3 data into pdf
#5
I did use the dialog like this:
        saveFilePath = filedialog.asksaveasfile(mode='w', title="Save the file", defaultextension=".pdf",
                        initialfile=pdf_file_name, filetypes=(("PDF Files", "*.pdf"),))

        saveFilePath.close()
and I am able to save as pdf but when trying to open it, it says it is not type of pdf. In the project directory the file is opening though. I think this will only have a default name of saving a file but not choosing the file that I want to save.
I found a solution that suits me. the pdf will open after it is created then the user can choose to save it.
subprocess.Popen([pdf_file_name], shell=True)
Reply


Messages In This Thread
load sqlite3 data into pdf - by rwahdan - Jul-23-2021, 06:56 PM
RE: load sqlite3 data into pdf - by Larz60+ - Jul-23-2021, 07:58 PM
RE: load sqlite3 data into pdf - by rwahdan - Jul-24-2021, 12:19 PM
RE: load sqlite3 data into pdf - by rwahdan - Jul-24-2021, 01:36 PM
RE: load sqlite3 data into pdf - by Yoriz - Jul-24-2021, 12:49 PM
RE: load sqlite3 data into pdf - by Hilal - Nov-29-2021, 07:58 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  PyQt5 form not displaying my data from SQLite3 Database Linuxdesire 2 5,101 Jan-10-2023, 09:51 PM
Last Post: gradlon93
Question [Tkinter] data enterred through gui is not storing in sqlite3 database Hilal 21 8,041 Dec-15-2021, 08:48 PM
Last Post: Hilal
  [Tkinter] I need to know how to put my SQLite3 data into a Treeview Thename921 1 7,237 Jan-12-2019, 10:26 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020