PDA

View Full Version : HELP in Creating PDF in Qt5.2 from database content.



webjack
26th December 2013, 09:53
Hi All,

I am developing a GUI application using Qt5.2.
I have a task to implement but I can't find any help on internet.
The task is: I need to click a push button and it should create and open a PDF file by fetching few entries from SQLITE database table and I can save it manually.

I need some guidance for this.

Thanks in advance for any suggestion and help.

myta212
26th December 2013, 09:58
Hi,
Are you have try this link : http://qt-project.org/wiki/Handling_PDF
The other method is you can look at qt-apps.org and search pdf reader/pdf viewer application.
So, you can use that.
Thank you.

Best regards,

Myta

ChrisW67
26th December 2013, 20:18
You create a PDF using the QPrinter class in Qt. Qt provides no mechanism on its own to display the generated PDF file although you can use the print preview to see what will go into the PDF before you output it. Qt can be used to launch a viewer for PDF files either with QProcess or QDesktopServices. Myta212's link covers most of the options including other libraries that may help.