D
Dimas Cyriaco
Hi,
I'm having some trouble to print things...
I have some data in a SQLite database that i have to print in label
format.
I'm using Pdf::Writer to configure the data in the page but i'm having
trouble when i execute the code to send the pdf file to the printer.
After a lot of researsh i get to this windows-only way to do this:
#Begining of the code
require 'Win32API'
fname = 'temp.pdf'
shell = Win32API.new("Shell32", "ShellExecute", ['L', 'P', 'P', 'P',
'P', 'L'], 'L')
shell.Call(0, "print", fname, 0,0, 1)
#End of the code
This code works. I get the pdf printed but it opens an Adobe Reader
blank windows that i don't want.
Do someone knows how to work it out?
Or have some better solution for this problem (even better if it is
multi-plataform)?
Thank you!
I'm having some trouble to print things...
I have some data in a SQLite database that i have to print in label
format.
I'm using Pdf::Writer to configure the data in the page but i'm having
trouble when i execute the code to send the pdf file to the printer.
After a lot of researsh i get to this windows-only way to do this:
#Begining of the code
require 'Win32API'
fname = 'temp.pdf'
shell = Win32API.new("Shell32", "ShellExecute", ['L', 'P', 'P', 'P',
'P', 'L'], 'L')
shell.Call(0, "print", fname, 0,0, 1)
#End of the code
This code works. I get the pdf printed but it opens an Adobe Reader
blank windows that i don't want.
Do someone knows how to work it out?
Or have some better solution for this problem (even better if it is
multi-plataform)?
Thank you!