6 Replies Latest reply on May 18, 2015 7:56 PM by philmodjunk

    Page number total script. Cause PDF error.



      Page number total script. Cause PDF error.



      Following the fantastic instructions of Filemaker's reference to page number (still doesn't work) totals http://help.filemaker.com/app/answers/detail/a_id/3629/~/printing-total-number-of-pages-with-a-script

      Enter Preview Mode
      Go to Record / Request / Page [Last]
      Set Variable [$pp; Value: Get (PageNumber)]
      Go to Record / Request / Page [First]
      Pause / Resume Script [Indefinitely]

      Has lead to a error to my exported PDFs. 

      "Acrobat: An error exists on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem."

      Fantastic, a issue i'm scratching my head over. Because far as I can tell I removed and eliminated all traces of the script. AKA I even deleted the script.


      A possibility: Recently I updated to iOS Yosemite in order to upgrade to filemaker 14. Perhaps I didn't check the PDFs to see if they were causing this issue before this. But I could of sworn I did because I had to readjust some font changes in calculations.

        • 1. Re: Page number total script. Cause PDF error.

          The script you posted does not generate a PDF so it is not clear to me what connection exists between your script and the PDF where you get the error message. Nor do you explain what happens to the value in $pp once it is assigned a value by this script.

          • 2. Re: Page number total script. Cause PDF error.

            Excuse me for the vagueness. Hopefully I formatted the following series of events correctly.

            Currently there should be no connection between the script and pdf. It was originally suppose to be the simple "Page 1 of 10" page numbering (code as follows: PAGE {{PAGENUMBER}} OF <<$pp>>). I believe I had the text box that contained "PAGE {{PAGENUMBER}} OF <<$pp>>" and clicked > script > script name <<#pp>>. Im not sure if this was damaging, and yes I know thats not the way it suppose to work but I did that on accident.

            The <<$pp>> value seems to do nothing. I tried this roughly around a year ago with no success but did not cause this to PDFs. Im no FileMaker expert but with all the instructions I have seen on this, I happen to have a hard time following this particular one.

            After attempting this script, I happen to get this odd error when opening the PDF's I create in this particular layout style. I have a few that have some different header images but essentially have the same purpose and information.

            I want to say the culprit is the upgrade to Yosemite, however I have another layout style that isn't giving me the error in the PDF which I did not attempt performing the script code in.

            I am using FileMaker Advance, apparently it can detect things for debugging but I haven't currently used this option neither am I sure how effective it is to giving me a clue in this nature.

            • 3. Re: Page number total script. Cause PDF error.

              Still don't see any connection between the script and what you report. Is "PAGE {{PAGENUMBER}} OF <<$pp>>" still text on your PDF layout? If so, then remove this text from your layout and see if it makes any difference. If it is not on your layout, I see no way for this script to have any effect on a PDF that is then saved from it.

              If I were to use this method to number pages, I'd use a global variable such as $$pp in the script and on the layout.

              • 4. Re: Page number total script. Cause PDF error.

                Found the culprit. I should probably delete this entire post.

                I have a portal that is causing this trouble all of sudden. I went through my entire layout and tested each field and calculation I had in by slowly removing each piece one at a time. Time to explore to figure out why this happened.

                I will keep you posted. If you have any suggestion why a portal may cause this issue Id be happy to hear it.

                I apologize this went in a totally different direction, I have no idea why it began to act up this way.

                • 5. Re: Page number total script. Cause PDF error.

                  Ok, I found the issue, but did I fix it is another question

                  So yes indeed it was a portal. However nothing is wrong with the portal. But in come cases no data goes into this portal. So now since the FileMaker Pro14 upgrade, if no information is in a portal it seems it will give the PDF a error that something isn't displaying properly.

                  Any idea how to work around that? Do you experience the same issue?

                  • 6. Re: Page number total script. Cause PDF error.

                    Just starting to explore FMP 14. If you can create a brand new layout and still consistently get this result when there are no records in the portal, please report it as a possible bug over in Report An Issue.