Creating a virtual printer with Qt

  • Greetings !

    Is it possible to create a virtual printer, with Qt and C++, that will be cross-platform ?

    I searched the web but I keep finding that you need to create drivers for different kernels (os x, win, etc) :( :(

    I just want to create something that will be recognized by OS X and WIN as a virtual printer. This printer will generate PDF files from the information received rather than printing to a physical printer.

    Any comments, ideas or links are helpful.
    I'm a Qt beginner and this is my first post here, so don't be pissed off if this sounds easy to you.

    Thanks in advance!

  • Hi,
    If it's just PDF's your creating:
    The printer itself virtual or not is OS specific. For every OS you need to write your own driver/application to get the printing tasks from the OS.

  • Hmmm .... I thought there can be some cross-platform Qt thing that once compiled, will show up as a printer in os x and win.

    Thanks for the link

  • Hi, I didn't say it couldn't be done, but why would Qt have a base class for it? Normal applications only output to a printer or file, almost never do they act like a printer.
    You could use Qt to supply the system with a virtual printer, that should be possible. Just figure out how the wanted OS needs drivers/links to your program to fulfill the needs of the OS. There might be differences in dependencies for OS's.

  • Thanks, I get a little of the idea.

    I am looking through Qt documentation to see if I can find something that hs to do with printers so I can read it.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.