Page 1 of 1
Print to a Epson Receipt Printer
Posted: Sat Jan 27, 2018 8:06 am
by marcnau
Hi, i am new to Livecode, i managed to set up a Database an some other stuff. Now i am stuck. i like to Print via iPad, a Field on a Receipt Printer witch is connected to a Router and the Router to my Network. Is it possible to do this just by code or do i need an other app on my iPad. I can print already stuff out off the Epson Utility app, just not from my own app.
Thank you
Re: Print to a Epson Receipt Printer
Posted: Mon Jan 29, 2018 5:29 pm
by MaxV
See:
http://lessons.livecode.com/s/lessons/m ... rl-schemes
You should create a PDF to print and send it to
print:/path/to/pdf_file.pdf
Re: Print to a Epson Receipt Printer
Posted: Tue Jan 30, 2018 8:24 pm
by marcnau
hi Max
Thank you for your Help. I got it working out of livecode on my mac but not on the Ipad.
on printCards
put specialFolderPath("documents") & "/UserGuide.pdf" into tPDFPath
open printing to pdf tPDFPath
if the result is "Cancel" then
## The user has cancelled printing
exit printCards
else
## Print the card into the printable area
print card 1 of this stack into 0,0,100,150
end if
close printing
end printCards
This prints some code, not the document i like to print, on the computer, not on the ipad.
I dont get how the link you posted helps with my problem can you explain?
Thank you very much
Re: Print to a Epson Receipt Printer
Posted: Wed Jan 31, 2018 2:03 am
by MaxV
On mobile apps are isolated, they can't talk each other as normal programs on a Mac.
So the epson print app is on a island
Your livecode app is no another island
iOS hasn't a way to print
You have to send a message in a bootle to the app to print. A way is to send it use an url scheme.
Mobile device have avery complex (and stupid) structure.
Another way si to create a PDF, save it on specialFolderPath("documents") and then open the epson app to print it.
Read here:
http://livecode.wikia.com/wiki/IOS_filesystem
Re: Print to a Epson Receipt Printer
Posted: Thu Feb 01, 2018 7:20 am
by marcnau
aa now i guess i get it. I will try thank you
Re: Print to a Epson Receipt Printer
Posted: Thu Feb 01, 2018 4:16 pm
by MaxV
another solution is this:
Code: Select all
on mouseUp
put specialFolderPath("Documents") & slash & "test.pdf" into tPDFFile
delete file tPDFFile
open printing to pdf tPDFFile
print this card
close printing
rreHardcopyPrintPDF tPDFFile, "Test PDF Print"
answer "PrintPDF returned" && the result
end mouseUp
See also:
https://www.youtube.com/watch?v=XTdLNBN3XUw
and
http://livecode.wikia.com/wiki/RreHardcopyPrintPDF