Open Printing to PDF on IOS

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Batninja
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 55
Joined: Sat Oct 15, 2011 9:43 am

Open Printing to PDF on IOS

Post by Batninja » Sat Nov 17, 2018 7:31 pm

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

quailcreek
Posts: 746
Joined: Sun Feb 04, 2007 11:01 pm
Location: McKenna, WA

Re: Open Printing to PDF on IOS

Post by quailcreek » Sat Nov 17, 2018 9:49 pm

Look up rreHardcopyPrintPDF in the dictionary. You will also need to include the rrehardcopy library in your apps standalone settings under the inclusions tab.
Tom
MacBook Pro OS Mojave 10.14

Batninja
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 55
Joined: Sat Oct 15, 2011 9:43 am

Re: Open Printing to PDF on IOS

Post by Batninja » Sat Nov 17, 2018 11:58 pm

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?

Batninja
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 55
Joined: Sat Oct 15, 2011 9:43 am

Re: Open Printing to PDF on IOS

Post by Batninja » Sun Nov 18, 2018 12:31 am

Well this is embarrassing, I just found that I’d answered this query myself a year ago. Doh!
viewtopic.php?t=28373

Sigh

quailcreek
Posts: 746
Joined: Sun Feb 04, 2007 11:01 pm
Location: McKenna, WA

Re: Open Printing to PDF on IOS

Post by quailcreek » Sun Nov 18, 2018 2:49 am

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
Last edited by quailcreek on Sun Nov 18, 2018 2:57 am, edited 1 time in total.
Tom
MacBook Pro OS Mojave 10.14

Post Reply

Return to “iOS Deployment”