iOS Print
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 5
- Joined: Fri Mar 18, 2011 1:36 am
iOS Print
I am having problems with using the print to pds function. I have PDF
Printing selected in the iOS Standalone Application Settings. This is
the test script I have in the print button:
on mouseUp
open printing to pdf "mypdf.pdf"
print this card
close printing
end mouseUp
This is from the dictionary. Nothing happens. Is the filename
"mypdf.pdf" a generic filename, or do I need to save and give a custom
name first? I have been through both the User Manual, iOS Release Notes, Dictionary and Forum.
How is Air Print handled? Is the external required?
I will appreciate any help.
Printing selected in the iOS Standalone Application Settings. This is
the test script I have in the print button:
on mouseUp
open printing to pdf "mypdf.pdf"
print this card
close printing
end mouseUp
This is from the dictionary. Nothing happens. Is the filename
"mypdf.pdf" a generic filename, or do I need to save and give a custom
name first? I have been through both the User Manual, iOS Release Notes, Dictionary and Forum.
How is Air Print handled? Is the external required?
I will appreciate any help.
Re: iOS Print
Hi Michelle,
Download the latest 5.5 rreHardcopy sample externals if you haven't already :
http://www.runrev.com/developers/docume ... rnals-sdk/
The builds attached are for iOS5. rename the dylib in the Hardcopy/binaries folder to just "rrehardcopy.dylib". It won't work in the simulator, only on a real device.
You can then use something like:
put specialFolderPath("Documents") & "/tempPrint.pdf" into tPDFFile
rreHardcopyPrintPDF tPDFFile,"iOS Print"
Make sure you have PDF Printing checked in the iOS Standalone settings
All the best
Pi
Download the latest 5.5 rreHardcopy sample externals if you haven't already :
http://www.runrev.com/developers/docume ... rnals-sdk/
The builds attached are for iOS5. rename the dylib in the Hardcopy/binaries folder to just "rrehardcopy.dylib". It won't work in the simulator, only on a real device.
You can then use something like:
put specialFolderPath("Documents") & "/tempPrint.pdf" into tPDFFile
rreHardcopyPrintPDF tPDFFile,"iOS Print"
Make sure you have PDF Printing checked in the iOS Standalone settings
All the best
Pi
Re: iOS Print
As of LC 5.0.2 PDF printing works unless you have graphics effects applied to objects on the card you want to print. You do not need an external (AirPrint does require an external). It works in the simulator also.Your code should work using any legal filename you want for the pdf. You need to tell LC which directory to save your PDF to by either specifying a complete path or setting the default path. Your code as written will save the PDF to the default folder.
Re: iOS Print
Hi michelle300 (wow, that's a lot
),
I think you need to add a valid filename like this:
Best
Klaus

yes, that is just an example name!michelle300 wrote:on mouseUp
open printing to pdf "mypdf.pdf"
print this card
close printing
end mouseUp
This is from the dictionary. Nothing happens. Is the filename
"mypdf.pdf" a generic filename, or do I need to save and give a custom
name first?
I think you need to add a valid filename like this:
Code: Select all
on mouseUp
## we are allowed to write here:
put specialfolderpath("documents") & "/Name of your pdf here.pdf" into tPrintPDF
open printing to pdf tPrintPDF
print this card
close printing
## Check if file has been created, optional :-)
answer (there is a file tPrintPDF)
## Will be TRUE on success, FALSE otherwise
end mouseUp
Klaus
Re: iOS Print
FYI I have a new external coming soon on mergExt which will allow you to present the standard iOS modal screens, action sheets and popovers to preview documents, send them to other apps, print etc. You can also get the icon for a doc too.
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/
Re: iOS Print
Monte, you are the iOS external king! Those additions to your already strong suite will be fantastic. Since it seems you can churn these out in your sleep, how about AES256 encryption for those docs that are being sent to other apps. The RunRev team seem to be having problems porting encrypt/decrypt to iOS.
-
- Posts: 5
- Joined: Fri Mar 18, 2011 1:36 am
Re: iOS Print
Thanks so much for everyones help!
Re: iOS Print
I'm trying to stay clear of RunRev's obvious roadmap of porting what works on desktop onto mobile but can you give me more detail. I've already added the file protection to mergXattr. If the file is encrypted the app at the other end won't be able to open it. Maybe you want a custom url protocol with encrypted parameters to move data around your own apps?
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/
Re: iOS Print
Be careful using encription on iOS ...CALL-151 wrote:... Since it seems you can churn these out in your sleep, how about AES256 encryption for those docs that are being sent to other apps. The RunRev team seem to be having problems porting encrypt/decrypt to iOS.
... read here : http://blog.theanimail.com/iphone-encry ... e-for-apps and here : http://blog.theanimail.com/iphone-encry ... for-apps-0
Using encription on iOS can put you in a veeery long approval process ...

Guglielmo
Re: iOS Print
Understood, but for medical apps in the US there's no option. All identifying info must be encrypted with AES-128 or better. This is built into the hardware, but once unlocked files will be sent in the clear unless the app that "owns" then encrypts.
Re: iOS Print
This is a confusing situation with conflicting info, but here's my understanding. Enabling protection ensures that files are hardware encrypted with AES-256, but they are decrypted on the fly as soon as the device is unlocked. This prevents someone from extracting data from a stolen device, but does nothing to protect data sent via email, from app to app, etc.monte wrote:I'm trying to stay clear of RunRev's obvious roadmap of porting what works on desktop onto mobile but can you give me more detail. I've already added the file protection to mergXattr. If the file is encrypted the app at the other end won't be able to open it. Maybe you want a custom url protocol with encrypted parameters to move data around your own apps?
In early January I spoke to RunRev about this. They confirmed that they do intend to bring encryption to mobile, but that they were having issues with compatibility of the mobile versions of the SSL library that they use on the desktop, requiring significant changes to the engine and standalone builder.
Re: iOS Print
Hi CALL-151,
I never tried, but have you verified if the LIBRC4 of Mark Smith can be used or adapted on iOS ?
I read that Mark is no more with us ... but the web page, full of nice libraries, is still there : http://marksmith.on-rev.com/revstuff/
Guglielmo
I never tried, but have you verified if the LIBRC4 of Mark Smith can be used or adapted on iOS ?
I read that Mark is no more with us ... but the web page, full of nice libraries, is still there : http://marksmith.on-rev.com/revstuff/
Guglielmo
Re: iOS Print
Unfortunately, as I understand the requirements RC4 is not FIPS 140-2 validated, which means that it does not meet US requirements for protecting health information. The minimum seems to be AES-128 with a 10-bit key.
Re: iOS Print
I could implement this fairly quickly for you using this https://github.com/dev5tec/FBEncryptor
You would get a function to encrypt a string and return it base64encoded and one that does the reverse.
Given its so clearly on the run rev roadmap it might not be a good fit for my half price deal though. Contact me off list if you want to discuss it some more.
You would get a function to encrypt a string and return it base64encoded and one that does the reverse.
Given its so clearly on the run rev roadmap it might not be a good fit for my half price deal though. Contact me off list if you want to discuss it some more.
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/
Re: iOS Print
I see your point. RR support said they hope to have a beta by sometime this summer, although I suspect it will take longer. You might want to offer an external soln directly to them. Perhaps they'd be relieved to have a viable option, even in the interim.monte wrote:Given its so clearly on the run rev roadmap it might not be a good fit for my half price deal though. Contact me off list if you want to discuss it some more.