October 3, 201213 yr A bit of an odd request here. Working on a client database that has several multi-page layouts. Client wants a PDF report that is simply a printed version of all the layouts ( a single record, but 18 pages ). The number of pages will always be static (18), because it's a single record. However, because we have layouts that are more than one page long, I haven't found a clever way to handle page numbering in the footer. I'm familiar with using calcs and set field steps to aggregate page numbers on muti-layout, appended PDFs. That won't work in this case. The big problem is that there appears to be no way to isolate a "page" in Preview mode. Any field in the footer, whether it's a calc or not, will always display the same data on every page of a multi-page layout in Preview mode. If there was a way to, say, "go to Page [last]" and then OMIT the page from Preview, I think we'd have a solution. Perhaps a feature request for FM. Any ideas?
October 3, 201213 yr Could easily be done with ScriptMaster and iText to do the page numbering after the creation.
October 3, 201213 yr Author Hmm. That might be a good alternative. No way to do this entirely within FileMaker?
October 3, 201213 yr because we have layouts that are more than one page long, I haven't found a clever way to handle page numbering in the footer. I don't understand your description of the problem. Filemaker numbers the pages, not records - so a multi-page layout will have multiple page numbers.
October 16, 201213 yr Author I don't understand your description of the problem. Filemaker numbers the pages, not records - so a multi-page layout will have multiple page numbers. Sure, but I'm creating an appended PDF from multiple layouts. Layout #1 has 2 pages. Layout #2 has 3 pages. A PDF, with page numbering in the footer, would be numbered as follows: 1, 2, 1, 2, 3, instead of 1, 2, 3, 4, 5. Using a script to store the "current" page number works if I had multiple records, but does not work for multiple layouts with multiple pages.
October 16, 201213 yr IIUC, when you print Layout #2, you need to use a calculation field that adds 2 to the real page number. Or, if - as you say - the number of pages is constant, you could simply place the actual page numbers as text in the body part.
October 17, 201213 yr Author IIUC, when you print Layout #2, you need to use a calculation field that adds 2 to the real page number. As mentioned earlier, this cannot work for the situation described. What's really needed is a way to isolate a page in preview mode. Or, if - as you say - the number of pages is constant, you could simply place the actual page numbers as text in the body part. And this is the 'solution' I chose. I had hoped there would be a way to achieve this using only the footer. Thanks for your suggestions, though. Hey, comment, have you had a chance to look at this post yet? http://fmforums.com/forum/topic/86428-ontimer-script-during-idle-time/
October 17, 201213 yr As mentioned earlier, this cannot work for the situation described. Then I still don't understand the problem. Why wouldn't it work for the situation you described in post #5 above?
October 17, 201213 yr So, either you have to preview each document in turn taking note of last page number and adding it in a field for total page numbers then go back to first layout with 'page num of total', then save number of pages and got to second with 'page num + previous number of total' and append PDF etc etc or the answer is contained somewhere in here http://fmforums.com/forum/topic/78279-itext-page-numbers-except-first-page/page__hl__pdf+number make the whole PDF and put the page x of y on right at the end
October 17, 201213 yr Author I think I've resolved the issue, at least part of it. The method I was familiar with for aggregating page numbers on multi-layout PDFs called for Global calc fields (to aggregate #s during the script). There's no "go to record" steps in my solution, though, because it's only one record. However, I was still using a Global calc field in the footer to generate my page numbers. There's the rub. Changing this to an unstored calc at least gives me proper footer page numbers for multi-page layouts in Preview, which I wasn't getting before. I believe I can simply write case statements for the remaining layouts now (Case ( Get ( PageNumber ) = 5 ; 8 ) etc.
October 17, 201213 yr I believe I can simply write case statements for the remaining layouts now (Case ( Get ( PageNumber ) = 5 ; 8 ) etc. Why not simply = Get ( PageNumber ) + 3 or perhaps = Get ( PageNumber ) + Get ( Scriptparameter )
October 17, 201213 yr Author Possibly. I have 18 pages from 10 layouts, so I think I'll need more than Get ( PageNumber ) + 3. Also, I'd still like to have this as simple calcs within the footer, so no Script Parameter.
Create an account or sign in to comment