Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

Recommended Posts

Posted

Hi all:

I'm using a script to temporarily store, then print, a document from our server (FMS v21.0.2.202) to a remote printer. (Script attached.) The problem is, just at the end of the script--using the Print command--the file opens on the end-user's computer via their .pdf viewing program. Is there a way to prevent (or circumvent) the opening of the document using their .pdf program so they don't see the document at all?

Cheers,

Rich

Screenshot 2024-10-22 at 1.50.12 PM.png

Script.pdf

Posted (edited)

Could this be the problem?

image.png.78dfe6b2f27bc68d6feb7f6d169e5bae.png

 

BTW, if your purpose is to print the order, then what do you need the PDF for?

 

 

Edited by comment
Posted

Yes, it is! Rookie Mistake #23,819. : P 

Thanks for catching that--it was giving me a royal brain hernia.

Posted (edited)

I celebrated too early: Even with the Automatically Open switch disabled, not only does the document appear in the Web browser in a new tab, but the customer is asked if s/he wants to download the document. (See attached.) Neither event happens in the FileMaker Pro client, so it's something that interacts with WebDirect. Back to playing with the file.

 

Screenshot 2024-10-23 at 10.20.37 AM.png

Edited by Rich S
Posted
58 minutes ago, Rich S said:

not only does the document appear in the Web browser in a new tab, but the customer is asked if s/he wants to download the document.

That is the expected behavior of Save Records as PDF in WebDirect:
https://help.claris.com/en/pro-help/content/save-records-as-pdf.html

You didn't answer my question:

20 hours ago, comment said:

BTW, if your purpose is to print the order, then what do you need the PDF for?

 

Posted (edited)

Sorry, I forgot to answer: It's because Enter Preview Mode isn't available in WebDirect and Server. The printouts include summarized data, so I thought that as an alternative I could use Save Records as PDF since, at least in this instance, it summarizes the data so the output looks the same as in Preview Mode.

The big picture is to eliminate the robot we have set up on another server (with FMP installed) to simplify things, but I it appears that I just may not be able to do that. An alternative would be to reformat the reports so they don't have to be in Preview Mode to appear aesthetically pleasing, but that's not what the administrator he wants, so... *hmph*

 

 

Edited by Rich S
Posted (edited)

Sorry, I don't follow your explanation.

When you print something, you are supposed to get the same result as shown in Preview mode, whether you go into Preview mode beforehand or not. The reason to go into Preview mode is to get user's approval before the actual printing. I see no such attempt in your script. It just dumps the PDF into the temporary folder (in FMP) and proceeds to print the same thing on paper. The printed result will be the same if you eliminate the PDF step.

Note also that printing directly is not supported in WebDirect:

Quote

 

In FileMaker WebDirect:

  • This script step creates a PDF in a new web browser tab. To print the PDF, use the web browser's controls.

 

https://help.claris.com/en/pro-help/content/print.html

 

Edited by comment
Posted

I think I'm fighting a losing battle with trying to make this work. : |

Here's the background: customers file order via WebDirect. Currently, there's an FMP client on another server that acts as a robot--there's a script in it that looks for new orders every ten minutes; if found, customers are sent e-mails confirming their orders and formatted copies of the order forms are printed for the Production staff to pull and divvy out to process.

I questioned why there was batch processing of orders--why not simply e-mail/print new orders as they come in? If we could retire the robot, that would simplify things since on occasion it acts a little flaky (printing the same order multiple times instead of printing two copies, not printing at all, etc.

...but, seeing that using Print via WebDirect results in a new tab being created on the customers' browsers with the Production version of the order, it's not the best situation since customers will look askance at the printout and go, "What's this?" ...hence my idea of forgoing sending e-mail notifications to the customer and just having them download a copy of the order since it'll appear on-screen (because of the Print command.)

I'm not a drinking man, but I think I'll start.

 

Posted

Just thinking out loud for a moment:

I think the obstacle here is printing the orders for your staff. To send an email confirming the order with a PDF of the order attached to it, you could use a script performed on the server (this needs to be checked). But the Print command is not supported in PSOS and printing on the customer's machine would not help, even if it were easy. 

 

  • Thanks 1

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.