Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 3211 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (edited)

I had a request to print PDFs from an iPad.

In the past I created a bot that based on Sic Fried Rice's (if I'm not mistaken)  technique would print a label on a label printer by triggering a script from the iPad.

I would like to be able print without setting up a Bot, PHP or using a plugin.

I got close but for some reason I'm stuck on the last bit and I'm sure other developers have done this before.

So the process I came up with so far is:

1, I found a lightweight utility called SumatraPDF which I copied to the Doc folder on the Windows FM 14 server

2. I populated a global field with the batch file string to print the document

(e.g. "C:\Program Files\FileMaker\FileMaker Server\Data\Documents\sumatrapdf"  "C:\Program Files\FileMaker\FileMaker Server\Data\Documents\1.pdf"   -print-to-default)

3. I created a print script for the iPad that runs a PSOS script that exports the global field to the documents folder and opens it

 

So when running the script from the iPad I can see it creates the correct batch file on the server and I can click on it manually to run - it works

Problem is it doesn't print when run from the iPad.

Maybe 'open automatically' isn't supported on PSOS?

I'm open to other ideas....

 

Dan

 

Update: seems that it is unrelated to printing - the batch file just doesn't get run.

Edited by Dan Rosenstein
Posted

You have an existing PDF stored in a container and you need to print it? And you can't export it to temp and open in Preview to print?

Posted

The PDF needs to be printed at a printer connected to the Server. The PDF is already in the system (FMS). The challenge here is calling a shell command to print, not the PDF itself i think.

 

Posted

That is correct.

I got the PDF in a container and out to the server.

I can't get the server to run a batch file remotely (triggered by the iPad).

Posted

Possibly, but the printout needs to be immediate and I would need to schedule it to run every minute (or whatever the fastest occurrence would be) and that could strain the server and the result wouldn't be immediate in most cases.

Posted

Great Charles!

Seems to work with simple commands (like Dir,Del etc..). Trying to get the print to work too - currently it's stuck on 'transferring url...' and doesn't print.

I like the PHP implementation, although it does require the PHP engine to be running. :beertime:

In any case, I think it can be useful for many developers.

Posted

So having done some more testing and investigation I'm close to conclude that the reason the printing isn't working is due to permissions issues on shared network drivers.

A preliminary test to a generic local TXT printer seemed to work.

Next I will attempt to configure a network printer as a local printer (using the IP as the port) and see if it bites.

Posted

Update:

I have confirmed that setting up a direct IP port resolves the issue of not being able to print to shared network printers

This topic is 3211 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.