AnsweredAssumed Answered

FileMaker Server 16 Save to PDF - Get (PageNumber) Not Working

Question asked by user2617 on Sep 6, 2017
Latest reply on Sep 7, 2017 by user14047

Hello,

 

I recently tried to generate a PDF on FileMaker Server 16 using the Save to PDF script step via a Perform Script on Server script.  When I try to use the Get ( PageNumber ) function which normally works when I am in Preview Mode, I cannot get the value.  This prevents me from being able to set the total pages in a variable (global or local) that would then in turn all me to embed it in the PDF, i.e. 1 of 5, 2 of 5, 3 of 5, etc.

 

Here are the script steps that I am trying to run, which work normally under FileMaker Pro 16 Advanced:

 

Go to Layout [ “iPad - CA - Projects_LI - PDF Export” (CA_Projects_LI) ; Animation: None ]

Sort Records [ Restore ; With dialog: Off ]

#

Print Setup [ Restore ; With dialog: Off ]

Enter Preview Mode [ Pause: Off ]

Go to Record/Request/Page [ Last ]

Set Field [ CA_Projects_LI::g_Total_Pages_Text ; "/" & Get ( PageNumber) ]

Set Variable [ $$total_Pages ; Value: Get ( PageNumber ) ]

Set Variable [ $$total_Pages_Text ; Value: "/" & $$total_Pages ]

Go to Record/Request/Page [ First ]

 

The $$total_Pages_Text variable is then placed at the bottom of the layout used to generate the PDF as a Merge Variable.

 

Is this something that was overlooked or not tested when the Save to PDF script step was added to the FileMaker Server 16 engine?  Could someone at FileMaker finally add a Total Pages symbol similar to the Page Number symbol {{PageNumber}} that can be added to a print layout?  Or is there some other symbol that currently exists that would serve this function?

 

Thank you,

 

Andres

Outcomes