Page 1 of 1

Open Printing to PDF on IOS

Posted: Sat Nov 17, 2018 7:31 pm
by Batninja
Hi

I'm having a problem with getting Open printing to PDF to work on an iPhone.
This is the code I'm using in a button on mouseup script:

Code: Select all

	put the documents folder & "/PaperStand.pdf" into tPDFPath
	open printing to pdf tPDFPath
	print card 1 of stack "PDF Layout" into 0,0,575,800
	close printing
  	mergReader tPDFPath
mergReader works with a different PDF, the stack prints a PDF on my Mac but on iPhone the script just fails (i.e. any code after the close printing line does not run) :(
I'm using LC Indy 9.01

Has anyone got a working IOS print to pdf script please, or any advice to share?

Thanks in advance.

Roger

Re: Open Printing to PDF on IOS

Posted: Sat Nov 17, 2018 9:49 pm
by quailcreek
Look up rreHardcopyPrintPDF in the dictionary. You will also need to include the rrehardcopy library in your apps standalone settings under the inclusions tab.

Re: Open Printing to PDF on IOS

Posted: Sat Nov 17, 2018 11:58 pm
by Batninja
Thanks Quailcreek, still no joy though even with rreHardcopy included.

It seems as if that the rreHardCopy library is to "present the standard printing interface controller, offering to print the given PDF file with the specified job name." i.e. to send the pdf to the external physical printer which I am actually using mergereader for.

I'm not really sure that rreHardcopy is involved in generating the PDF in the first place though?

Re: Open Printing to PDF on IOS

Posted: Sun Nov 18, 2018 12:31 am
by Batninja
Well this is embarrassing, I just found that I’d answered this query myself a year ago. Doh!
viewtopic.php?t=28373

Sigh

Re: Open Printing to PDF on IOS

Posted: Sun Nov 18, 2018 2:49 am
by quailcreek
rreHardCopy is needed in iOS to print the pdf. I worked this all out a couple of years ago.

This is a thread that I went thru when I was doing something similar. It might give you some ideas.

http://forums.livecode.com/viewtopic.php?f=49&t=24391