Page 2 of 2

Re: iOS Print

Posted: Tue Mar 06, 2012 9:14 pm
by monte
Nah, they could implement and test that in a few hours if they want something short term.

Re: iOS Print

Posted: Wed Mar 14, 2012 9:44 am
by monte
Hi

Just letting you know I've added the document interaction external to mergExt.com. The document preview will allow the user to print all the ios supported document types like PDF, office, iWork etc.

Cheers

Monte

Re: iOS Print

Posted: Mon Mar 26, 2012 9:34 pm
by seaniepie
Hi
I'm trying to print and have the following:

Code: Select all

on mouseUp
   put specialFolderPath("Documents") & "/printTemp.pdf" into tPDFFile
   delete file tPDFFile
   open printing to pdf tPDFFile
   print this card from 10,10 to 100,100
   answer "printing"
   close printing
end mouseUp
I've used the 'answer "printing" ' so that I can breakpoint on the iOS simulator. It's during the 'Print this card' line that the app crashes every time. Is anyone else getting this too? I've tried with and without the from..to with no joy.

Thanks in advance
Sean

Re: iOS Print

Posted: Mon Mar 26, 2012 9:43 pm
by CALL-151
Looks to me like your code should work. There's a bug in LC 5.0.2 (can't recall if it's in earlier versions) that will cause PDF printing to fail if there are any graphics effects applied to objects on the card being printed. This has reportedly been fixed in LC 5.5.0 but I haven't tested it yet. If you're using a version prior to 5.5, remove all graphics effects before using "Print this card".

Re: iOS Print

Posted: Mon Mar 26, 2012 10:17 pm
by seaniepie
Ahh, brill. I stopped using 5.5 because some of the other features were broken. I will try it out tho to see if that is the problem and if it is fixed.

Re: iOS Print

Posted: Mon Mar 26, 2012 10:26 pm
by seaniepie
Nope, still crashes in the very latest LC5.5. Even in a clean stack with only one button and no effects. I'll report it.
Pi

Re: iOS Print

Posted: Mon Mar 26, 2012 10:49 pm
by CALL-151
This works for me in 5.0.2 and 5.5.0.

Code: Select all

 on mouseUp
   set the defaultFolder to specialFolderPath("Documents")
   ask "Save this PDF as:" 
   if the result is "Cancel" then exit mouseUp
   put it & ".pdf" into tFile
   set the printPaperOrientation to "landscape"
   open printing to pdf tFile
   print this card from 0,0 to 1024,768 into 0,0,800,600
   close printing
end mouseUp

Re: iOS Print

Posted: Tue Mar 27, 2012 2:56 am
by seaniepie
Thanks for that,

Just tried it with no luck, still crashes. Is that in iOS for you?

Re: iOS Print

Posted: Tue Mar 27, 2012 2:22 pm
by CALL-151
Yes, a single 1024X768 card (attached). Are you sure that you're selecting the PDF printing external in the "build for iOS" standalone settings?

Re: iOS Print

Posted: Tue Mar 27, 2012 3:40 pm
by seaniepie
Hi
Yes, I even checked inside the compiled app and see the pdf print lib file there. Thomas McGrath on the dev forum helped out tho with an alternative script which I'll be trying out later today. I'll of course let you know how I get on. He's effectively using export snapshot to PNG then using the rreHardcopyPrintPDF external to print the PNG (because it prints more than just pdf's) to an AirPrinter.
As it turns out, having just got word back from the client, we'll probably have some pre-made pdfs that I can include in the App to print directly from so I don't need to do the card-to-pdf route meaning I can avoid the 'print this card' line.
Thanks though
Sean

Re: iOS Print

Posted: Mon Apr 02, 2012 3:44 pm
by gpb01
CALL-151 wrote:... 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.
Hi CALL-151 ... still need AES256 on iOS ?
I prepared an external and I'm searching for a beta-tester so, if you are still interested, please contact me by e-mail : guglielmo (at) braguglia (dot) ch :)

Guglielmo