Enable Preview Mode (and related functionality) on Server

Idea created by PeterDoern on Aug 10, 2017


    Now that FileMaker Server can print to PDF, it should be able to "see" the output prior to actually generating the PDF. For example, Get ( PageNumber ) does not resolve on FileMaker Server.



    Case in point: I have a script that generates a single PDF (using Append to PDF) based on various different layouts. This PDF should have contiguous page numbers. To achieve this on the client I have a calculated field:

    pageNumber = PageStart + Get ( PageNumber ) - 1

    where PageStart is a global number field.


    When run from the client I set PageStart by dropping into Preview Mode, going to the last page, and setting PageStart to PageStart + Get ( Record/Request/Page ). On server I use BaseElements and pdftk to get the number of pages of the PDF-in-progress.


    Unfortunately, Get ( PageNumber ) doesn't resolve correctly on the server so each page of each chunk only displays the total pages for that section.