Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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

Why are you not using the native Save As PDF ( open automatically ) script step?

  • Author

Well, the issue isn't creating the PDF, it's printing it.

In any case, Save As PDF isn't server compatible.

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?

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.

 

  • Author

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).

Can you flag the record and run a scheduled server script?

  • Author

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.

  • Author

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.

  • Author

Thanks OlgerDiekstra.

  • Author

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.

  • Author

Update:

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

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.